Skip to content

Commit c1b276d

Browse files
authored
fix(announcements): change header name
1 parent f2c48f9 commit c1b276d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/controllers/admin-controller.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ export const saveAnnouncementDraft = async (req, res, next) => {
134134

135135
export const getAnnouncementAdmin = async (req, res, next) => {
136136
try {
137-
await check("announcement_id").notEmpty().run(req);
137+
await check("announcementid").notEmpty().run(req);
138138

139139
const errors = validationResult(req);
140140

@@ -152,8 +152,8 @@ export const getAnnouncementAdmin = async (req, res, next) => {
152152
return;
153153
}
154154

155-
const { announcement_id } = req.headers;
156-
const announcement = Announcements.findById(announcement_id);
155+
const { announcementid } = req.headers;
156+
const announcement = Announcements.findById(announcementid);
157157

158158
if (announcement) {
159159
res.locals.type = "info";

0 commit comments

Comments
 (0)