Skip to content

Commit

Permalink
bug(api): quick bug fix for response undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
kyrea committed Feb 26, 2025
1 parent e3df925 commit 4dd0295
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/pages/api/notifications/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export default async function handler(req, res) {
try {
const { uid } = req.headers;

fetch(`${process.env.API_URL}/notifications`, {
const response = fetch(`${process.env.API_URL}/notifications`, {
method: "GET",
headers: { "Content-Type": "application/json", uid },
});
Expand Down
2 changes: 1 addition & 1 deletion src/pages/api/notifications/read.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export default async function handler(req, res) {
.json({ message: "You have to provide an User ID" });
}

fetch(`${process.env.API_URL}/notifications/read`, {
const response = fetch(`${process.env.API_URL}/notifications/read`, {
method: "PATCH",
headers: { "Content-Type": "application/json", uid: uid },
body: JSON.stringify({ id: nid }),
Expand Down

0 comments on commit 4dd0295

Please sign in to comment.