fix: .js toevoegen aan imports
This commit is contained in:
parent
c10fc8db17
commit
6297347206
6 changed files with 16 additions and 16 deletions
|
@ -1,8 +1,8 @@
|
|||
import { Request, Response } from 'express';
|
||||
import { requireFields } from './error-helper';
|
||||
import { getLearningObjectId, getQuestionId } from './questions';
|
||||
import { createAnswer, deleteAnswer, getAnswer, getAnswersByQuestion, updateAnswer } from '../services/answers';
|
||||
import { FALLBACK_SEQ_NUM } from '../config';
|
||||
import { requireFields } from './error-helper.js';
|
||||
import { getLearningObjectId, getQuestionId } from './questions.js';
|
||||
import { createAnswer, deleteAnswer, getAnswer, getAnswersByQuestion, updateAnswer } from '../services/answers.js';
|
||||
import { FALLBACK_SEQ_NUM } from '../config.js';
|
||||
import { AnswerData } from '@dwengo-1/common/interfaces/answer';
|
||||
|
||||
export async function getAllAnswersHandler(req: Request, res: Response): Promise<void> {
|
||||
|
|
|
@ -4,7 +4,7 @@ import { FALLBACK_LANG, FALLBACK_SEQ_NUM, FALLBACK_VERSION_NUM } from '../config
|
|||
import { LearningObjectIdentifier } from '../entities/content/learning-object-identifier.js';
|
||||
import { QuestionData, QuestionId } from '@dwengo-1/common/interfaces/question';
|
||||
import { Language } from '@dwengo-1/common/util/language';
|
||||
import { requireFields } from './error-helper';
|
||||
import { requireFields } from './error-helper.js';
|
||||
|
||||
export function getLearningObjectId(hruid: string, version: string, lang: string): LearningObjectIdentifier {
|
||||
return {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { mapToQuestionDTO, mapToQuestionDTOId } from './question.js';
|
||||
import { Answer } from '../entities/questions/answer.entity.js';
|
||||
import { AnswerDTO, AnswerId } from '@dwengo-1/common/interfaces/answer';
|
||||
import { mapToTeacherDTO } from './teacher';
|
||||
import { mapToTeacherDTO } from './teacher.js';
|
||||
|
||||
/**
|
||||
* Convert a Question entity to a DTO format.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import express from 'express';
|
||||
import { createAnswerHandler, deleteAnswerHandler, getAnswerHandler, getAllAnswersHandler, updateAnswerHandler } from '../controllers/answers';
|
||||
import { createAnswerHandler, deleteAnswerHandler, getAnswerHandler, getAllAnswersHandler, updateAnswerHandler } from '../controllers/answers.js';
|
||||
|
||||
const router = express.Router({ mergeParams: true });
|
||||
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
import { getAnswerRepository } from '../data/repositories';
|
||||
import { Answer } from '../entities/questions/answer.entity';
|
||||
import { mapToAnswerDTO, mapToAnswerDTOId } from '../interfaces/answer';
|
||||
import { fetchTeacher } from './teachers';
|
||||
import { fetchQuestion } from './questions';
|
||||
import { getAnswerRepository } from '../data/repositories.js';
|
||||
import { Answer } from '../entities/questions/answer.entity.js';
|
||||
import { mapToAnswerDTO, mapToAnswerDTOId } from '../interfaces/answer.js';
|
||||
import { fetchTeacher } from './teachers.js';
|
||||
import { fetchQuestion } from './questions.js';
|
||||
import { QuestionId } from '@dwengo-1/common/interfaces/question';
|
||||
import { AnswerData, AnswerDTO, AnswerId } from '@dwengo-1/common/interfaces/answer';
|
||||
import { NotFoundException } from '../exceptions/not-found-exception';
|
||||
import { NotFoundException } from '../exceptions/not-found-exception.js';
|
||||
|
||||
export async function getAnswersByQuestion(questionId: QuestionId, full: boolean): Promise<AnswerDTO[] | AnswerId[]> {
|
||||
const answerRepository = getAnswerRepository();
|
||||
|
|
|
@ -4,9 +4,9 @@ import { Question } from '../entities/questions/question.entity.js';
|
|||
import { QuestionRepository } from '../data/questions/question-repository.js';
|
||||
import { LearningObjectIdentifier } from '../entities/content/learning-object-identifier.js';
|
||||
import { QuestionData, QuestionDTO, QuestionId } from '@dwengo-1/common/interfaces/question';
|
||||
import { NotFoundException } from '../exceptions/not-found-exception';
|
||||
import { FALLBACK_VERSION_NUM } from '../config';
|
||||
import { fetchStudent } from './students';
|
||||
import { NotFoundException } from '../exceptions/not-found-exception.js';
|
||||
import { FALLBACK_VERSION_NUM } from '../config.js';
|
||||
import { fetchStudent } from './students.js';
|
||||
|
||||
export async function getAllQuestions(id: LearningObjectIdentifier, full: boolean): Promise<QuestionDTO[] | QuestionId[]> {
|
||||
const questionRepository: QuestionRepository = getQuestionRepository();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue