mirror of
https://github.com/Myzel394/kleckrelay-website.git
synced 2025-06-20 08:15:26 +02:00
feat: Add find public key api
This commit is contained in:
parent
0395bce5dd
commit
2a1fbf4bd8
19
src/apis/find-public-key.ts
Normal file
19
src/apis/find-public-key.ts
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
import {client} from "~/constants/axios-client"
|
||||||
|
|
||||||
|
export interface FindPublicKeyResponse {
|
||||||
|
publicKey: string
|
||||||
|
type: string
|
||||||
|
createdAt: Date
|
||||||
|
}
|
||||||
|
|
||||||
|
export default async function findPublicKey(): Promise<FindPublicKeyResponse> {
|
||||||
|
const {data} = await client.post(
|
||||||
|
`${import.meta.env.VITE_SERVER_BASE_URL}/v1/preferences/find-public-key`,
|
||||||
|
{},
|
||||||
|
{
|
||||||
|
withCredentials: true,
|
||||||
|
},
|
||||||
|
)
|
||||||
|
|
||||||
|
return data
|
||||||
|
}
|
@ -74,3 +74,5 @@ export * from "./get-api-keys"
|
|||||||
export {default as getAPIKeys} from "./get-api-keys"
|
export {default as getAPIKeys} from "./get-api-keys"
|
||||||
export * from "./delete-api-key"
|
export * from "./delete-api-key"
|
||||||
export {default as deleteAPIKey} from "./delete-api-key"
|
export {default as deleteAPIKey} from "./delete-api-key"
|
||||||
|
export * from "./find-public-key"
|
||||||
|
export {default as findPublicKey} from "./find-public-key"
|
||||||
|
@ -9,6 +9,7 @@ export interface UpdatePreferencesData {
|
|||||||
aliasProxyUserAgent?: ProxyUserAgentType
|
aliasProxyUserAgent?: ProxyUserAgentType
|
||||||
aliasExpandUrlShorteners?: boolean
|
aliasExpandUrlShorteners?: boolean
|
||||||
aliasRejectOnPrivacyLeak?: boolean
|
aliasRejectOnPrivacyLeak?: boolean
|
||||||
|
emailGpgPublicKey: string | null
|
||||||
}
|
}
|
||||||
|
|
||||||
export default async function updatePreferences(
|
export default async function updatePreferences(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user