feat: update backend
This commit is contained in:
31
frontend/admin/src/api/mockService.js
Normal file
31
frontend/admin/src/api/mockService.js
Normal file
@@ -0,0 +1,31 @@
|
||||
/**
|
||||
* Mock service that provides fake data for development
|
||||
*/
|
||||
export const mockService = {
|
||||
/**
|
||||
* Get mock count of posts
|
||||
* @returns {Promise<{count: number}>}
|
||||
*/
|
||||
getPostsCount() {
|
||||
console.log('Using MOCK service for posts count');
|
||||
return Promise.resolve({ count: 42 });
|
||||
},
|
||||
|
||||
/**
|
||||
* Get mock count of media items
|
||||
* @returns {Promise<{count: number}>}
|
||||
*/
|
||||
getMediasCount() {
|
||||
console.log('Using MOCK service for medias count');
|
||||
return Promise.resolve({ count: 18 });
|
||||
},
|
||||
|
||||
/**
|
||||
* Get all mock statistics in a single call
|
||||
* @returns {Promise<{posts: number, medias: number}>}
|
||||
*/
|
||||
getAllStatistics() {
|
||||
console.log('Using MOCK service for all statistics');
|
||||
return Promise.resolve({ posts: 42, medias: 18 });
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user