Skip to content

Commit

Permalink
EGCETSII#16 - fix: changed files and fixed urls
Browse files Browse the repository at this point in the history
  • Loading branch information
ferrabled committed Dec 18, 2021
1 parent d9ef05d commit 60099e0
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 43 deletions.
12 changes: 0 additions & 12 deletions decide/administration/frontend/src/api/authApiUtils.ts

This file was deleted.

30 changes: 30 additions & 0 deletions decide/administration/frontend/src/api/baseApiUtils.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import { axios } from "api/config";


const baseApi = {
// KEYS OPERATIONS
//Bulk operation
getKeys: () => axios.get("/base/key"),
deleteKeys: () => axios.delete(`/base/key/`),

//Individual operations
getKey: (id: string) => axios.get(`/base/key/${id}`),
createKey: (key: any) => axios.post("/base/key/", key),
updateKey: (key: any) => axios.put(`/base/key/${key.id}`, key),
deleteKey: (id: string) => axios.delete(`/base/key/${id}`),


// AUTH OPERATIONS
//Bulk operation
getAuths: () => axios.get("/base/auth"),
createAuth: (auth: any) => axios.post("/base/auth/", auth),
deleteAuths: () => axios.delete(`/base/auth`),

//Individual operations
getAuth: (id: string) => axios.get(`/base/auth/${id}`),
updateAuth: (auth: any) => axios.put(`/base/auth/${auth.id}`, auth),
deleteAuth: (id: string) => axios.delete(`/base/auth/${id}`)
};


export default baseApi;
17 changes: 0 additions & 17 deletions decide/administration/frontend/src/api/keyApiUtils.ts

This file was deleted.

8 changes: 0 additions & 8 deletions decide/administration/frontend/src/api/logoutApiUtils.ts

This file was deleted.

12 changes: 6 additions & 6 deletions decide/administration/frontend/src/api/userApiUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@ import { axios } from "api/config";

const userApi = {
// bulk operations
getUsers: () => axios.get("api/users"),
getUsers: () => axios.get("/users"),
//createUsers: (user: any) => axios.post("/users/", user),
deleteUsers: () => axios.delete("api/users"),
deleteUsers: () => axios.delete("/users"),

// individual operations
getUser: (id: string) => axios.get(`api/users/${id}`),
createUser: (user: any) => axios.post("api/users", user),
updateUser: (user: any) => axios.put(`api/users/${user.id}`, user),
deleteUser: (id: string) => axios.delete(`api/users/${id}`),
getUser: (id: string) => axios.get(`/users/${id}`),
createUser: (user: any) => axios.post("/users", user),
updateUser: (user: any) => axios.put(`/users/${user.id}`, user),
deleteUser: (id: string) => axios.delete(`/users/${id}`),
};


Expand Down

0 comments on commit 60099e0

Please sign in to comment.