-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Week1 #1
base: develop
Are you sure you want to change the base?
Week1 #1
Conversation
.gitignore
Outdated
|
||
#Environment | ||
.env |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
em kiểm tra lại xem tại sao thêm file .evn rồi nhưng git vẫn đẩy lên
Có thể tham khảo: https://stackoverflow.com/questions/1274057/how-do-i-make-git-forget-about-a-file-that-was-tracked-but-is-now-in-gitignore
src/ValidationPipeOptions.ts
Outdated
import { ValidatorOptions, ValidationError } from "class-validator"; | ||
|
||
export interface ValidationPipeOptions extends ValidatorOptions { | ||
transform?: boolean; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thử bỏ dấu ? xem có nhận không
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lỗi môi trường anh ạ, em clone về máy ở thư mục khác thì chạy được rồi ạ
questionname:string; | ||
difficultlevel:number; | ||
answer1:string; | ||
answer2:string; | ||
answer3:string; | ||
correctanswer:number; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sửa lại tên biến theo dạng camelCase:
questionName, difficultLevel, correctAnswer
Đoan này đã check lint chưa? sao a thấy dấu : vẫn dính với text?
src/auth/auth.service.ts
Outdated
@@ -1,6 +1,7 @@ | |||
import { Injectable } from '@nestjs/common'; | |||
import { UserService } from 'src/modules/user/user.service'; | |||
import { JwtService } from '@nestjs/jwt'; | |||
import {compare} from "bcrypt" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
check lint dòng này
src/modules/exam/exam.service.ts
Outdated
@@ -64,7 +78,7 @@ export class ExamService { | |||
return q4; | |||
} | |||
|
|||
async getResult(ide: number, idu: number, Body) { | |||
async getResult(ide: number, idu: number, Body): Promise<number> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ide với idu là gì?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
id của exam và id của user anh,
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
viết rõ ra em nhé, tránh viết tắt như thế, người khách đọc sẽ không hiểu
src/modules/exam/exam.service.ts
Outdated
async getHistory(id: number): Promise<ExamHistory[]> { | ||
let history = await this.dataSource.manager | ||
.createQueryBuilder(ExamHistory, 'examhistory') | ||
.where('examhistory.userId=:userid', { userid: id }) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
check lại các tên biến viết theo kiểu camelCase nhé
|
||
@IsString() | ||
@IsNotEmpty() | ||
@MinLength(5) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sao lại lệch dòng thế này?
src/modules/user/user.controller.ts
Outdated
page: page, | ||
}; | ||
|
||
console.log(page); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Xóa những console không cần thiết
No description provided.