Skip to content

Commit

Permalink
feat: 건의사항 리스트 API 구현 #22
Browse files Browse the repository at this point in the history
  • Loading branch information
inyeong-kang committed Jan 28, 2023
1 parent b057937 commit b8b3203
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/pages/Proposal/api/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { AxiosResponse } from 'axios';

import { api } from '@/api';

const API_URL='/proposals'

const getProposal = (): Promise<AxiosResponse<ProposalResponse>> => {
return api.get(`${API_URL}`);
};

export { getProposal };
13 changes: 13 additions & 0 deletions src/types/proposal.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
type ProposalResponse = {
count: number;
next?: number | null;
previous?: number | null;
results?: ProposalResult | [];
};

type ProposalResult = {
id: number;
title: string;
created_user: string;
created_time: string;
}[];

0 comments on commit b8b3203

Please sign in to comment.