mirror of
https://github.com/gabehf/Koito.git
synced 2026-04-22 20:11:50 -07:00
feat: add server=side cfg and default theme
This commit is contained in:
parent
b1b8498eab
commit
a436bf5c2f
8 changed files with 84 additions and 26 deletions
|
|
@ -101,6 +101,10 @@ function logout(): Promise<Response> {
|
|||
})
|
||||
}
|
||||
|
||||
function getCfg(): Promise<Config> {
|
||||
return fetch(`/apis/web/v1/config`).then(r => r.json() as Promise<Config>)
|
||||
}
|
||||
|
||||
function getApiKeys(): Promise<ApiKey[]> {
|
||||
return fetch(`/apis/web/v1/user/apikeys`).then((r) => r.json() as Promise<ApiKey[]>)
|
||||
}
|
||||
|
|
@ -214,6 +218,7 @@ export {
|
|||
imageUrl,
|
||||
login,
|
||||
logout,
|
||||
getCfg,
|
||||
deleteItem,
|
||||
updateUser,
|
||||
getAliases,
|
||||
|
|
@ -309,6 +314,9 @@ type ApiKey = {
|
|||
type ApiError = {
|
||||
error: string
|
||||
}
|
||||
type Config = {
|
||||
default_theme: string
|
||||
}
|
||||
|
||||
export type {
|
||||
getItemsArgs,
|
||||
|
|
@ -323,5 +331,6 @@ export type {
|
|||
User,
|
||||
Alias,
|
||||
ApiKey,
|
||||
ApiError
|
||||
ApiError,
|
||||
Config
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue