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

hot-fix-2 #13

Merged
merged 2 commits into from
Aug 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,4 +71,4 @@
"prisma": {
"seed": "swc-node prisma/seed.ts"
}
}
}
2 changes: 1 addition & 1 deletion pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion prisma/schema.prisma
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ model User {
model Repo {
id Int @id @default(autoincrement())
name String @db.VarChar(255)
url String @db.VarChar(255)
url String @db.VarChar(255) @unique

Problem Problem[]
UserRepo UserRepo[]
Expand Down
1 change: 0 additions & 1 deletion src/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import { ReposModule } from './repos/repos.module'
import { ProblemModule } from './problem/problem.module'
import { TestcaseModule } from './testcase/testcase.module'


@Module({
imports: [
ConfigModule.forRoot({ isGlobal: true }),
Expand Down
2 changes: 0 additions & 2 deletions src/auth/auth.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ export class AuthService {
username
},
select: {

id: true,
password: true
}
Expand Down Expand Up @@ -58,7 +57,6 @@ export class AuthService {
return user.role === Role.Tutor
}


async deSerializeUser(userId: number): Promise<{ userId: number }> {
const user = await this.prisma.user.findUnique({
where: { id: userId },
Expand Down
1 change: 0 additions & 1 deletion src/auth/class/authenticated-user.class.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
export class AuthenticatedUser {

#userId: number
constructor(userId: number) {
this.#userId = userId
Expand Down
2 changes: 1 addition & 1 deletion src/repos/repos.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export class ReposController {

//학생이 레포 url 요청 + id
@Roles(Role.Student)
@Get(':id') //repo이름
@Get(':id') //repo이름
async getRepoUrl(@Param('id') id: string, @Body() body) {
return await this.reposService.getRepoUrl(id, body)
}
Expand Down
5 changes: 1 addition & 4 deletions src/repos/repos.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@ import {
NotAcceptableException
} from '@nestjs/common'
import { PrismaService } from '../prisma/prisma.service'
import * as nodegit from 'nodegit'
import { Request } from 'express'
import { stderr, stdout } from 'process'
// eslint-disable-next-line @typescript-eslint/no-var-requires
const path = require('path')
// eslint-disable-next-line @typescript-eslint/no-var-requires
Expand Down Expand Up @@ -76,7 +73,7 @@ export class ReposService {
exec(`./scripts/add-user ${id} ${body.sha}`, (err, stdout, stderr) => {
console.log(err)
})
return requestedUrl.url
return 'test'
}

async getRepos() {
Expand Down