fix inline code with ProfilePicture
This commit is contained in:
1 parent
fd5a7d0426
commit
edd81b66de
6 files changed
+56
-225
No files matched your search
@@ -0,0 +1,10 @@
|
||||
import fetchWrapper from "../fetchWrapper";
|
||||
|
||||
export default async function deleteProfilePhoto(): Promise<{ status: number; ok: boolean; data?: any; error?: string }> {
|
||||
try {
|
||||
const response = await fetchWrapper("/api/profile-photo", null, "DELETE");
|
||||
return { status: response.status || 0, ok: response.status >= 200 && response.status < 300, data: response.data };
|
||||
} catch (err: any) {
|
||||
return { status: 0, ok: false, error: err?.message || "Network error" };
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user