Skip to content

Commit 0d16acf

Browse files
committed
refactor: baseRequest -> http 네이밍 변경
Resolve: #20
1 parent a43a8b9 commit 0d16acf

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

client/src/apis/util.ts renamed to client/src/apis/http.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@ import axios from 'axios';
22

33
const SERVER_URL = 'http://localhost:8080';
44

5-
export const baseRequest = axios.create({
5+
export const http = axios.create({
66
baseURL: SERVER_URL,
77
});

client/src/apis/user.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
import { baseRequest } from './util';
1+
import { http } from './http';
22

33
export const getWorkspaces = async (userId: number) => {
44
try {
5-
const { data } = await baseRequest.get(`/user/${userId}/workspace`);
5+
const { data } = await http.get(`/user/${userId}/workspace`);
66

77
return data;
88
} catch (e) {
9-
console.log(e);
9+
return;
1010
}
1111
};

0 commit comments

Comments
 (0)