feat(mobile): ConsentScreen + consent api

This commit is contained in:
Sven (AAMOS AI)
2026-08-13 02:14:03 +07:00
parent 61c3193f17
commit e88bbb50a6
3 changed files with 132 additions and 0 deletions
+14
View File
@@ -107,4 +107,18 @@ export async function uploadImage(
if (!res.ok) throw new ApiError(res.status, "UPLOAD_FAILED", "Bilduppladdningen misslyckades.");
}
export interface ConsentStatus {
accepted: boolean;
version: string;
acceptedAt: string | null;
}
export async function getConsent(): Promise<ConsentStatus> {
return api<ConsentStatus>("/v1/me/consent");
}
export async function acceptConsent(): Promise<ConsentStatus> {
return api<ConsentStatus>("/v1/me/consent", { method: "POST" });
}
export { API_BASE };