Skip to content

Commit

Permalink
updated directory structure
Browse files Browse the repository at this point in the history
  • Loading branch information
Xunnamius committed May 31, 2020
1 parent ee49ea3 commit 7ddea03
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/pages/api/v1/election/[id]/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { handleEndpoint } from 'universe/backend/middleware'

import type { NextApiResponse, NextApiRequest } from 'next'

export { config } from 'universe/backend/middleware';

export default async function(req: NextApiRequest, res: NextApiResponse) {
await handleEndpoint(async ({ res }) => {
// TODO...
void res;
}, { req, res, methods: [ 'GET', 'PUT', 'DELETE' ] });
}
12 changes: 12 additions & 0 deletions src/pages/api/v1/election/[id]/voters.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { handleEndpoint } from 'universe/backend/middleware'

import type { NextApiResponse, NextApiRequest } from 'next'

export { config } from 'universe/backend/middleware';

export default async function(req: NextApiRequest, res: NextApiResponse) {
await handleEndpoint(async ({ res }) => {
// TODO...
void res;
}, { req, res, methods: [ 'GET', 'PUT' ] });
}

0 comments on commit 7ddea03

Please sign in to comment.