Merge pull request #117 from SELab-2/main

Hotfix/0.1.1 (`main` -> `dev`)
This commit is contained in:
Tibo De Peuter 2025-03-14 00:01:36 +01:00 committed by GitHub
commit 4aa800cf40
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 2112 additions and 756 deletions

View file

@ -14,15 +14,10 @@ RUN npm install --silent
# Root tsconfig.json # Root tsconfig.json
COPY tsconfig.json ./ COPY tsconfig.json ./
WORKDIR /app/docs
COPY docs ./
RUN npm run swagger
WORKDIR /app/backend WORKDIR /app/backend
COPY backend ./ COPY backend ./
COPY docs /app/docs
RUN npm run build RUN npm run build
@ -34,8 +29,8 @@ COPY package-lock.json backend/package.json ./
RUN npm install --silent --only=production RUN npm install --silent --only=production
COPY ./docs /docs
COPY --from=build-stage /app/backend/dist ./dist/ COPY --from=build-stage /app/backend/dist ./dist/
COPY --from=build-stage /app/docs/api ./docs/swagger
EXPOSE 3000 EXPOSE 3000

View file

@ -1,6 +1,6 @@
{ {
"name": "dwengo-1-backend", "name": "dwengo-1-backend",
"version": "0.0.1", "version": "0.1.1",
"description": "Backend for Dwengo-1", "description": "Backend for Dwengo-1",
"private": true, "private": true,
"type": "module", "type": "module",

View file

@ -21,9 +21,9 @@ app.use(authenticateUser);
// Add response time logging // Add response time logging
app.use(responseTime(responseTimeLogger)); app.use(responseTime(responseTimeLogger));
// Swagger app.use('/api', apiRouter);
app.get('/api', apiRouter);
// Swagger
app.use('/api-docs', swaggerUi.serve, swaggerMiddleware); app.use('/api-docs', swaggerUi.serve, swaggerMiddleware);
async function startServer() { async function startServer() {

View file

@ -1,10 +1,10 @@
import { Response, Router } from 'express'; import { Response, Router } from 'express';
import studentRouter from './student.js'; import studentRouter from './students.js';
import groupRouter from './group.js'; import groupRouter from './groups.js';
import assignmentRouter from './assignment.js'; import assignmentRouter from './assignments.js';
import submissionRouter from './submission.js'; import submissionRouter from './submissions.js';
import classRouter from './class.js'; import classRouter from './classes.js';
import questionRouter from './question.js'; import questionRouter from './questions.js';
import authRouter from './auth.js'; import authRouter from './auth.js';
import themeRoutes from './themes.js'; import themeRoutes from './themes.js';
import learningPathRoutes from './learning-paths.js'; import learningPathRoutes from './learning-paths.js';

View file

@ -3,7 +3,7 @@ import { Class } from '../entities/classes/class.entity.js';
import { ClassDTO, mapToClassDTO } from '../interfaces/class.js'; import { ClassDTO, mapToClassDTO } from '../interfaces/class.js';
import { mapToStudentDTO, StudentDTO } from '../interfaces/student.js'; import { mapToStudentDTO, StudentDTO } from '../interfaces/student.js';
import { mapToTeacherInvitationDTO, mapToTeacherInvitationDTOIds, TeacherInvitationDTO } from '../interfaces/teacher-invitation.js'; import { mapToTeacherInvitationDTO, mapToTeacherInvitationDTOIds, TeacherInvitationDTO } from '../interfaces/teacher-invitation.js';
import { getLogger } from '../logging/initalize'; import { getLogger } from '../logging/initalize.js';
const logger = getLogger(); const logger = getLogger();

View file

@ -1,6 +1,6 @@
import { RequestHandler } from 'express'; import { RequestHandler } from 'express';
import swaggerUi from 'swagger-ui-express'; import swaggerUi from 'swagger-ui-express';
import swaggerDocument from '../../docs/api/swagger.json'; import swaggerDocument from '../../docs/api/swagger.json' with { type: 'json' };
const swaggerMiddleware: RequestHandler = swaggerUi.setup(swaggerDocument); const swaggerMiddleware: RequestHandler = swaggerUi.setup(swaggerDocument);

View file

@ -16,7 +16,7 @@ const doc = {
description: 'Development server', description: 'Development server',
}, },
{ {
url: 'https://sel2-1.ugent.be/api', url: 'https://sel2-1.ugent.be/',
description: 'Production server', description: 'Production server',
}, },
], ],
@ -26,7 +26,7 @@ const doc = {
type: 'oauth2', type: 'oauth2',
flows: { flows: {
implicit: { implicit: {
authorizationUrl: 'http://localhost:7080/realms/student/protocol/openid-connect/auth', authorizationUrl: 'https://sel2-1.ugent.be/idp/realms/student/protocol/openid-connect/auth',
scopes: { scopes: {
openid: 'openid', openid: 'openid',
profile: 'profile', profile: 'profile',
@ -39,7 +39,7 @@ const doc = {
type: 'oauth2', type: 'oauth2',
flows: { flows: {
implicit: { implicit: {
authorizationUrl: 'http://localhost:7080/realms/teacher/protocol/openid-connect/auth', authorizationUrl: 'https://sel2-1.ugent.be/idp/realms/teacher/protocol/openid-connect/auth',
scopes: { scopes: {
openid: 'openid', openid: 'openid',
profile: 'profile', profile: 'profile',

File diff suppressed because it is too large Load diff

View file

@ -1,6 +1,6 @@
{ {
"name": "dwengo-1-frontend", "name": "dwengo-1-frontend",
"version": "0.0.1", "version": "0.1.1",
"description": "Frontend for Dwengo-1", "description": "Frontend for Dwengo-1",
"private": true, "private": true,
"type": "module", "type": "module",

View file

@ -1,6 +1,6 @@
{ {
"name": "dwengo-1-monorepo", "name": "dwengo-1-monorepo",
"version": "0.0.1", "version": "0.1.1",
"description": "Monorepo for Dwengo-1", "description": "Monorepo for Dwengo-1",
"private": true, "private": true,
"type": "module", "type": "module",