Opus refactor
This commit is contained in:
@@ -17,8 +17,6 @@ type AuthCache = {
|
||||
expiresAt: number
|
||||
}
|
||||
|
||||
let authCache: AuthCache | undefined
|
||||
|
||||
export class ApiError extends Error {
|
||||
status: number
|
||||
|
||||
@@ -144,6 +142,8 @@ export type Identity = {
|
||||
is_admin: boolean
|
||||
}
|
||||
|
||||
let authCache: AuthCache | undefined
|
||||
|
||||
export async function makeAuth(): Promise<string | undefined> {
|
||||
const current = account()
|
||||
if (!current) return undefined
|
||||
|
||||
Reference in New Issue
Block a user