Add Oudelaa dashboard API integration
فشلت بعض الفحوصات
Deploy To Ghaymah / deploy (push) Has been cancelled
فشلت بعض الفحوصات
Deploy To Ghaymah / deploy (push) Has been cancelled
هذا الالتزام موجود في:
13
oudelaa_dashboard/lib/api/posts.ts
Normal file
13
oudelaa_dashboard/lib/api/posts.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
import { apiEndpoints } from "@/lib/api/endpoints";
|
||||
import { fetchWithAuth } from "@/lib/auth/client";
|
||||
import type { PostsResponse, SuccessMessage } from "@/types/api";
|
||||
|
||||
export async function listModerationPosts(params: Record<string, string | number | boolean | null | undefined> = {}) {
|
||||
return fetchWithAuth<PostsResponse>(apiEndpoints.posts.moderation(params));
|
||||
}
|
||||
|
||||
export async function deleteAdminPost(postId: string) {
|
||||
return fetchWithAuth<SuccessMessage>(apiEndpoints.posts.adminDelete(postId), {
|
||||
method: "DELETE",
|
||||
});
|
||||
}
|
||||
المرجع في مشكلة جديدة
حظر مستخدم