diff --git a/src/apis/find-public-key.ts b/src/apis/find-public-key.ts new file mode 100644 index 0000000..46bf918 --- /dev/null +++ b/src/apis/find-public-key.ts @@ -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 { + const {data} = await client.post( + `${import.meta.env.VITE_SERVER_BASE_URL}/v1/preferences/find-public-key`, + {}, + { + withCredentials: true, + }, + ) + + return data +} diff --git a/src/apis/index.ts b/src/apis/index.ts index ce3aceb..7d6bbb7 100644 --- a/src/apis/index.ts +++ b/src/apis/index.ts @@ -74,3 +74,5 @@ export * from "./get-api-keys" export {default as getAPIKeys} from "./get-api-keys" export * 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" diff --git a/src/apis/update-preferences.ts b/src/apis/update-preferences.ts index c3b90f8..ffbfe5d 100644 --- a/src/apis/update-preferences.ts +++ b/src/apis/update-preferences.ts @@ -9,6 +9,7 @@ export interface UpdatePreferencesData { aliasProxyUserAgent?: ProxyUserAgentType aliasExpandUrlShorteners?: boolean aliasRejectOnPrivacyLeak?: boolean + emailGpgPublicKey: string | null } export default async function updatePreferences(