diff --git a/README.md b/README.md index b4cb84b..1543494 100644 --- a/README.md +++ b/README.md @@ -41,7 +41,7 @@ Install game-api with yarn Clone the project ```bash - git clone https://github.com/sningratGames/game-admin-panel.git + git clone https://github.com/educational-game-project/game-admin-panel ``` Go to the project directory diff --git a/src/services/gameApi.ts b/src/services/gameApi.ts index f6329fd..1682c92 100644 --- a/src/services/gameApi.ts +++ b/src/services/gameApi.ts @@ -12,14 +12,14 @@ export const gameApi = coreApi.injectEndpoints({ endpoints: (builder) => ({ getGame: builder.mutation({ query: (data) => ({ - url: "/games/find", + url: "/game/find", method: "POST", body: data, }), }), getGameById: builder.mutation({ query: (id) => ({ - url: "/games/detail", + url: "/game/detail", method: "POST", body: id, }), @@ -40,7 +40,7 @@ export const gameApi = coreApi.injectEndpoints({ }); } return { - url: "/games", + url: "/game", method: "POST", body: formDefineGame, formData: true, @@ -65,7 +65,7 @@ export const gameApi = coreApi.injectEndpoints({ }); } return { - url: "/games", + url: "/game", method: "PUT", body: formEditGame, formData: true, @@ -75,7 +75,7 @@ export const gameApi = coreApi.injectEndpoints({ }), deleteGame: builder.mutation({ query: (id) => ({ - url: "/games", + url: "/game", method: "DELETE", body: id, }), diff --git a/src/services/logApi.ts b/src/services/logApi.ts index 1e272ad..f4eb7db 100644 --- a/src/services/logApi.ts +++ b/src/services/logApi.ts @@ -10,14 +10,14 @@ export const logApi = coreApi.injectEndpoints({ endpoints: (builder) => ({ getLogs: builder.mutation({ query: (data) => ({ - url: "/logs", + url: "/log/find", method: "POST", body: data, }), }), deleteLog: builder.mutation({ query: (id) => ({ - url: "/logs", + url: "/log", method: "DELETE", body: id, }), diff --git a/src/services/schoolApi.ts b/src/services/schoolApi.ts index f4c803b..90d463c 100644 --- a/src/services/schoolApi.ts +++ b/src/services/schoolApi.ts @@ -13,7 +13,7 @@ export const schoolApi = coreApi.injectEndpoints({ getSchool: builder.mutation( { query: (data) => ({ - url: "/schools/find", + url: "/school/find", method: "POST", body: data, }), @@ -21,7 +21,7 @@ export const schoolApi = coreApi.injectEndpoints({ ), getSchoolById: builder.mutation({ query: (id) => ({ - url: "/schools/detail", + url: "/school/detail", method: "POST", body: id, }), @@ -35,7 +35,7 @@ export const schoolApi = coreApi.injectEndpoints({ formAddSchool.append("media", data?.media[0] || ""); } return { - url: "/schools", + url: "/school", method: "POST", body: formAddSchool, formData: true, @@ -53,7 +53,7 @@ export const schoolApi = coreApi.injectEndpoints({ formEditSchool.append("media", data?.media[0] || ""); } return { - url: "/schools", + url: "/school", method: "PUT", body: formEditSchool, formData: true, @@ -63,7 +63,7 @@ export const schoolApi = coreApi.injectEndpoints({ }), deleteSchool: builder.mutation({ query: (id) => ({ - url: "/schools", + url: "/school", method: "DELETE", body: id, }),