Skip to content

Commit

Permalink
fix(api/subscribe): 불필요한 매개변수 제거
Browse files Browse the repository at this point in the history
  • Loading branch information
pp449 committed Nov 26, 2023
1 parent 9c1eaa3 commit 77bcd0e
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/apis/subscribe/controller.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
import { subscribeMajor, unsubscribeMajor } from '@apis/subscribe/service';
import {
pushNotification,
subscribeMajor,
unsubscribeMajor,
} from '@apis/subscribe/service';
import express, { Request, Response } from 'express';

const router = express.Router();
Expand All @@ -15,8 +19,8 @@ router.post('/major', async (req: Request, res: Response) => {

router.delete('/major', async (req: Request, res: Response) => {
try {
const { subscription, major } = req.body;
await unsubscribeMajor(subscription, major);
const { subscription } = req.body;
await unsubscribeMajor(subscription);
} catch (error) {
console.error(error);
} finally {
Expand All @@ -27,7 +31,7 @@ router.delete('/major', async (req: Request, res: Response) => {
// router.post('/push', async (req: Request, res: Response) => {
// try {
// const { major } = req.body.data;
// pushNotification(major);
// pushNotification(major, ['안녕', '내 이름은', '곱등이']);
// } catch (error) {
// console.error(error);
// } finally {
Expand Down

0 comments on commit 77bcd0e

Please sign in to comment.