Skip to content

Commit

Permalink
feat: readMyGroups 추상화
Browse files Browse the repository at this point in the history
  • Loading branch information
toothlessdev committed Jun 12, 2024
1 parent 1c5b95b commit 3a72ed4
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/services/member/memeber.service.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
import { api } from "@/config/axios";
import { IReadProfileResponse } from "./member.types";

import { IReadMyGroups, IReadProfileResponse } from "./member.types";

export const memberService = {
readProfile: async () => {
const response = await api.get<IReadProfileResponse>(`/members`);
return response.data;
},

readMyGroups: async (page: number = 0) => {
const response = await api.get<IReadMyGroups>(`/groups?page=${page}`);
return response.data.data.groupList;
},
};

0 comments on commit 3a72ed4

Please sign in to comment.