Skip to content

Commit d8de186

Browse files
committed
fix: remove unused code
1 parent 0bb1e51 commit d8de186

File tree

6 files changed

+3
-15
lines changed

6 files changed

+3
-15
lines changed

src/env.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import fs from 'fs';
2-
31
export const NODE_ENV = process.env.NODE_ENV || 'development';
42
export const URL_ORIGIN = process.env.URL_ORIGIN!;
53
export const SESSION_SECRET = process.env.SESSION_SECRET!;

src/routes/admin/points.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import fs from 'fs';
44
import { fetchSingleApiPage, getAPIClient, getBlocAtDate, getOffset, getPageNav, getPageNumber } from '../../utils';
55
import { ExpressIntraUser } from '../../sync/oauth';
66
import { createScore, handleFixedPointScore, shiftScore } from '../../handlers/points';
7-
import { deleteIntraScore, intraScoreSyncingPossible, syncIntraScore, syncTotalCoalitionScore, syncTotalCoalitionsScores } from '../../handlers/intrascores';
7+
import { deleteIntraScore, intraScoreSyncingPossible, syncIntraScore, syncTotalCoalitionScore } from '../../handlers/intrascores';
88

99
const SCORES_PER_PAGE = 100;
1010

src/routes/quiz.ts

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import express from 'express';
21
import { Express, Request, Response } from "express";
32
import passport from 'passport';
43
import { CustomSessionData } from '../handlers/session';
@@ -434,13 +433,6 @@ export const setupQuizRoutes = function(app: Express, prisma: PrismaClient): voi
434433
return res.status(400).send({ error: 'Not all questions have been answered' });
435434
}
436435

437-
// Get the user's Intra Coalition User
438-
const intraCoalitionUser = await prisma.intraCoalitionUser.findFirst({
439-
where: {
440-
user_id: user.id
441-
},
442-
});
443-
444436
const api = await getAPIClient();
445437
let joined = false;
446438

src/routes/results.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { PrismaClient } from '@prisma/client';
22
import { Express } from 'express';
3-
import { getUserScores, getUserRankingAcrossAllRankings, getUserSeasonRanking, getEndedSeasons, getSeasonResults } from '../utils';
3+
import { getEndedSeasons, getSeasonResults } from '../utils';
44

55
export const setupResultsRoutes = function(app: Express, prisma: PrismaClient): void {
66
app.get('/results', async (req, res) => {

src/sync/blocs.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@ import Fast42 from '@codam/fast42';
22
import { prisma, syncData } from './base';
33
import { linkCoalitionToBloc, syncCoalition } from './coalitions';
44
import { CAMPUS_ID, CURSUS_ID } from '../env';
5-
import { IntraBlocDeadline, Prisma } from '@prisma/client';
6-
import { DefaultArgs } from '@prisma/client/runtime/library';
75

86
// Bloc object can be an object returned by /v2/bloc/:id !
97
export const syncBloc = async function(bloc: any): Promise<void> {

src/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { PrismaClient, IntraUser, IntraCoalition, IntraBlocDeadline, CodamCoalitionScore, CodamCoalitionRanking, CodamCoalitionRankingResult, CodamCoalitionSeasonResult, CodamUser } from "@prisma/client";
1+
import { PrismaClient, IntraUser, IntraCoalition, IntraBlocDeadline, CodamCoalitionScore } from "@prisma/client";
22
import { ExpressIntraUser } from "./sync/oauth";
33
import Fast42 from "@codam/fast42";
44
import { api } from "./main";

0 commit comments

Comments
 (0)