feat(mobile): ConsentScreen + consent api
This commit is contained in:
@@ -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 };
|
||||
|
||||
Reference in New Issue
Block a user