feat: account deletion in settings + privacy policy with deletion link
This commit is contained in:
@@ -69,6 +69,7 @@ interface AuthState {
|
||||
blockUser: (userId: string) => Promise<void>;
|
||||
unblockUser: (userId: string) => Promise<void>;
|
||||
clearError: () => void;
|
||||
deleteAccount: () => Promise<void>;
|
||||
}
|
||||
|
||||
// ponytail: auto-subscribe to push notifications on auth
|
||||
@@ -249,4 +250,8 @@ export const useAuthStore = create<AuthState>((set) => ({
|
||||
unblockUser: async (userId) => {
|
||||
await api.delete(`/users/me/blocks/${userId}`);
|
||||
},
|
||||
|
||||
deleteAccount: async () => {
|
||||
await api.delete("/auth/me");
|
||||
},
|
||||
}));
|
||||
|
||||
Reference in New Issue
Block a user