feat: update backend

This commit is contained in:
yanghao05
2025-04-01 16:21:43 +08:00
parent 473f9d8e31
commit f696dfdfe8
17 changed files with 1958 additions and 43 deletions

View 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 });
}
};