Skip to content

Commit

Permalink
added axios
Browse files Browse the repository at this point in the history
  • Loading branch information
pm3512 committed Feb 3, 2024
1 parent 99ad388 commit 4290950
Show file tree
Hide file tree
Showing 3 changed files with 86 additions and 11 deletions.
92 changes: 83 additions & 9 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"@types/swagger-jsdoc": "^6.0.0",
"@types/swagger-ui-express": "^4.1.2",
"@zerollup/ts-transform-paths": "^1.7.18",
"axios": "^1.6.7",
"bcrypt": "^5.0.1",
"cors": "^2.8.5",
"crypto": "^1.0.1",
Expand Down
4 changes: 2 additions & 2 deletions src/controllers/CheckInController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import {

import Project from "../models/Project";
import { findUserTeam } from "./TeamController";
import axios from "axios";

export const recalculatePoints = async (
req: Request,
Expand Down Expand Up @@ -281,8 +282,7 @@ export const checkInUser = async (
const team = await findUserTeam(user._id);
const project = await Project.findOne({ team: team._id });
const judgingUrl = process.env.JUDGING_URL;
fetch(`${judgingUrl}/checkin?helixProjectId=${project._id}`, {
method: "PUT",
axios.put(`${judgingUrl}/checkin?helixProjectId=${project._id}`, {
headers: {
authorization: process.env.JUDGING_TOKEN,
},
Expand Down

0 comments on commit 4290950

Please sign in to comment.