We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a43a8b9 commit 0d16acfCopy full SHA for 0d16acf
client/src/apis/util.ts renamed to client/src/apis/http.ts
@@ -2,6 +2,6 @@ import axios from 'axios';
2
3
const SERVER_URL = 'http://localhost:8080';
4
5
-export const baseRequest = axios.create({
+export const http = axios.create({
6
baseURL: SERVER_URL,
7
});
client/src/apis/user.ts
@@ -1,11 +1,11 @@
1
-import { baseRequest } from './util';
+import { http } from './http';
export const getWorkspaces = async (userId: number) => {
try {
- const { data } = await baseRequest.get(`/user/${userId}/workspace`);
+ const { data } = await http.get(`/user/${userId}/workspace`);
return data;
8
} catch (e) {
9
- console.log(e);
+ return;
10
}
11
};
0 commit comments