mirror of
https://gitea.toothfairyai.com/ToothFairyAI/tf_code.git
synced 2026-04-02 23:23:45 +00:00
chore: format code
This commit is contained in:
@@ -41,13 +41,16 @@ export namespace Auth {
|
||||
|
||||
export async function all(): Promise<Record<string, Info>> {
|
||||
const file = Bun.file(filepath)
|
||||
const data = await file.json().catch(() => ({} as Record<string, unknown>))
|
||||
return Object.entries(data).reduce((acc, [key, value]) => {
|
||||
const parsed = Info.safeParse(value)
|
||||
if (!parsed.success) return acc
|
||||
acc[key] = parsed.data
|
||||
return acc
|
||||
}, {} as Record<string, Info>)
|
||||
const data = await file.json().catch(() => ({}) as Record<string, unknown>)
|
||||
return Object.entries(data).reduce(
|
||||
(acc, [key, value]) => {
|
||||
const parsed = Info.safeParse(value)
|
||||
if (!parsed.success) return acc
|
||||
acc[key] = parsed.data
|
||||
return acc
|
||||
},
|
||||
{} as Record<string, Info>,
|
||||
)
|
||||
}
|
||||
|
||||
export async function set(key: string, info: Info) {
|
||||
|
||||
Reference in New Issue
Block a user