Move API key para Secrets.swift fora do versionamento
- Secrets.swift entra no .gitignore; Secrets.swift.example fica como modelo - Adiciona .gitignore (xcuserdata, DerivedData) e README com instruções Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -54,9 +54,8 @@ struct Chapter: Decodable, Hashable {
|
||||
enum BibleAPI {
|
||||
static let baseURL = URL(string: "https://bible.falehandix.com.br")!
|
||||
|
||||
// NOTA: para produção, mover para um Secrets.xcconfig (fora do controle de
|
||||
// versão) ou para o Keychain. Mantido aqui apenas para a prova de conceito.
|
||||
static let apiKey = "3717732ae41aa989ec7e0b30568784d78d23a8e026f5df889d82ae4b54f2986b"
|
||||
// A chave vive em Secrets.swift (gitignored) — ver Secrets.swift.example.
|
||||
static let apiKey = Secrets.bibleAPIKey
|
||||
|
||||
/// Faz um GET na API e decodifica a resposta JSON.
|
||||
static func get<T: Decodable>(_ path: String, query: [URLQueryItem] = []) async throws -> T {
|
||||
|
||||
Reference in New Issue
Block a user