Skip to content
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

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from
Open

Week1 #1

wants to merge 4 commits into from

Conversation

damquanson
Copy link
Owner

No description provided.

.gitignore Outdated

#Environment
.env
Copy link
Collaborator

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

import { ValidatorOptions, ValidationError } from "class-validator";

export interface ValidationPipeOptions extends ValidatorOptions {
transform?: boolean;
Copy link
Collaborator

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

Copy link
Owner Author

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 ạ

Comment on lines -2 to -7
questionname:string;
difficultlevel:number;
answer1:string;
answer2:string;
answer3:string;
correctanswer:number;
Copy link
Collaborator

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?

@@ -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"
Copy link
Collaborator

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

@@ -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> {
Copy link
Collaborator

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ì?

Copy link
Owner Author

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,

Copy link
Collaborator

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

async getHistory(id: number): Promise<ExamHistory[]> {
let history = await this.dataSource.manager
.createQueryBuilder(ExamHistory, 'examhistory')
.where('examhistory.userId=:userid', { userid: id })
Copy link
Collaborator

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é

Comment on lines 4 to 8

@IsString()
@IsNotEmpty()
@MinLength(5)

Copy link
Collaborator

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?

page: page,
};

console.log(page);
Copy link
Collaborator

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants