railyard/apps/ritgram/mobile/services/complianceService.ts
caelum0x f80b04ae0f feat(ritgram): move GitGram app into railyard as Ritgram, next to Rithub
Moved later/gitgram-ai/gitgram/ to apps/ritgram/ (fresh history; full history stays in caelum0x/gitgram).
AITimeMachine stays separate in later/gitgram-ai per the Rithub master plan.
Logs, pid files and env files are ignored; GPL-3.0 mobile/proximity noted in THIRD_PARTY_NOTICES.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-11-13 04:18:46 +03:00

29 lines
801 B
TypeScript

import api from './api';
export const complianceService = {
exportUserData: async () => {
const response = await api.get('/compliance/export-data');
return response.data;
},
/**
* Deletes the account. The backend lives at `DELETE /auth/delete-account`
* (not `/compliance/account`, which never existed and always 404'd).
* Password accounts must pass `password`; OAuth-only accounts omit it.
*/
deleteAccount: async (password?: string) => {
const response = await api.delete('/auth/delete-account', {
data: password ? { password } : {},
});
return response.data;
},
updateDataRetention: async (retentionDays: number) => {
const response = await api.put('/compliance/retention', {
retentionDays,
});
return response.data;
},
};