Skip to content

Commit

Permalink
✨ : #55 - 전체 계획 & 닉네임 새로고침 임시 훅 생성
Browse files Browse the repository at this point in the history
  • Loading branch information
suehdn committed Nov 14, 2023
1 parent 44a299e commit e67f1ec
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/hooks/apis/plans/useAllPlansQuery.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { axiosInstance } from '@/apis/axiosInstance';

export const useAllPlansQuery = async () => {
try {
const { data } = await axiosInstance.get('/mock/plans', {
authorization: false,
});
// console.log(data);
return data;
} catch (error) {
console.log('Error:', error);
}
};
10 changes: 10 additions & 0 deletions src/hooks/apis/users/useRefreshNameMutation.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { axiosInstance } from '@/apis/axiosInstance';

export const useRefreshNameMutation = async () => {
try {
const { data } = await axiosInstance.post('/mock/users/refresh');
console.log(data);
} catch (error) {
console.log(error);
}
};

0 comments on commit e67f1ec

Please sign in to comment.