Commit 22ad96331a
Unsigned
Layout: unified · split
DomainDig/ContentView.swift +4
| @@ -3029,6 +3029,10 @@ private struct LocalAPISettingsView: View { | ||
| 3029 | 3029 | localAPIService.copyToken() |
| 3030 | 3030 | } |
| 3031 | 3031 | |
| 3032 | Button("Copy cURL Command") { | |
| 3033 | localAPIService.copyCurlCommand() | |
| 3034 | } | |
| 3035 | ||
| 3032 | 3036 | Button("Rotate Token") { |
| 3033 | 3037 | localAPIService.rotateToken() |
| 3034 | 3038 | } |
LocalAPIService.swift +5
| @@ -142,6 +142,11 @@ final class LocalAPIService { | ||
| 142 | 142 | AppClipboard.copy(config.token) |
| 143 | 143 | } |
| 144 | 144 | |
| 145 | func copyCurlCommand() { | |
| 146 | guard !config.token.isEmpty else { return } | |
| 147 | AppClipboard.copy("curl -H \"Authorization: Bearer \(config.token)\" \(address)/portfolio") | |
| 148 | } | |
| 149 | ||
| 145 | 150 | func localSecretReferences() -> [String] { |
| 146 | 151 | [LocalAPISecretStore.reference] |
| 147 | 152 | } |