mirror of
https://github.com/chriswritescode-dev/opencode-manager.git
synced 2026-12-05 12:24:30 +01:00
fix minimax use (#44)
* Fix provider API key storage to match OpenCode schema Backend was writing credentials with type 'apiKey' and field 'apiKey', but OpenCode expects type 'api' and field 'key'. This caused UI-set credentials to be silently ignored while environment variables worked. - Update AuthEntrySchema to use 'api' type and 'key' field - Update AuthService.set() to write new format - Add migration to convert existing entries on read Fixes #40 * Add auth service tests to validate schema fix and migration Tests verify: - Migration from old 'apiKey' format to 'api' format - New credentials are written in correct format - getAll, set, delete, list, and has methods work correctly --------- Co-authored-by: Chris Scott <chris@cstech.dev>
This commit is contained in:
1 parent
f1a7d36433
commit
c267bce42e
3 files changed
+391
-6
No files matched your search
@@ -1,8 +1,8 @@
|
||||
import { z } from "zod";
|
||||
|
||||
export const AuthEntrySchema = z.object({
|
||||
type: z.enum(["apiKey", "oauth"]),
|
||||
apiKey: z.string().optional(),
|
||||
type: z.enum(["api", "oauth"]),
|
||||
key: z.string().optional(),
|
||||
refresh: z.string().optional(),
|
||||
access: z.string().optional(),
|
||||
expires: z.number().optional(),
|
||||
|
||||
Reference in new issue
Block a user