feat: add daily chess puzzle page
All checks were successful
Deploy blog-frontend / build-and-deploy (push) Successful in 2m29s
All checks were successful
Deploy blog-frontend / build-and-deploy (push) Successful in 2m29s
This commit is contained in:
10
src/api/chess.ts
Normal file
10
src/api/chess.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
import { http } from './http';
|
||||
import { ApiResponse, ChessPuzzle } from '@/types';
|
||||
|
||||
export const getTodayChessPuzzle = async (timezone = 'Asia/Seoul') => {
|
||||
const response = await http.get<ApiResponse<ChessPuzzle>>('/api/chess-puzzles/today', {
|
||||
params: { timezone },
|
||||
});
|
||||
|
||||
return response.data.data;
|
||||
};
|
||||
Reference in New Issue
Block a user