fix
This commit is contained in:
@@ -49,6 +49,7 @@ export const listApiKeys = async (db: Db) =>
|
|||||||
revokedAt: apiKeys.revokedAt,
|
revokedAt: apiKeys.revokedAt,
|
||||||
})
|
})
|
||||||
.from(apiKeys)
|
.from(apiKeys)
|
||||||
|
.where(isNull(apiKeys.revokedAt))
|
||||||
.orderBy(apiKeys.createdAt)
|
.orderBy(apiKeys.createdAt)
|
||||||
|
|
||||||
export const createApiKey = async (db: Db, label: string, settings: ApiKeySettings = {}) => {
|
export const createApiKey = async (db: Db, label: string, settings: ApiKeySettings = {}) => {
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ export const useAuthAdmin = () => {
|
|||||||
const refresh = async (options?: { autoConnect?: boolean; connect?: () => void }) => {
|
const refresh = async (options?: { autoConnect?: boolean; connect?: () => void }) => {
|
||||||
status.value = await getStatus()
|
status.value = await getStatus()
|
||||||
if (status.value.authenticated) {
|
if (status.value.authenticated) {
|
||||||
apiKeys.value = (await listApiKeys()).apiKeys
|
apiKeys.value = (await listApiKeys()).apiKeys.filter((key) => !key.revokedAt)
|
||||||
sbiPasskeys.value = (await listSbiPasskeys()).passkeys
|
sbiPasskeys.value = (await listSbiPasskeys()).passkeys
|
||||||
selectedPasskeyId.value ||= sbiPasskeys.value[0]?.id ?? ''
|
selectedPasskeyId.value ||= sbiPasskeys.value[0]?.id ?? ''
|
||||||
if (options?.autoConnect && selectedPasskeyId.value) options.connect?.()
|
if (options?.autoConnect && selectedPasskeyId.value) options.connect?.()
|
||||||
|
|||||||
Reference in New Issue
Block a user