feat(pipelines): 添加流水线模块。

This commit is contained in:
Ivan
2021-03-01 15:22:45 +08:00
parent ea4ca724e3
commit e3e698b8cb
11 changed files with 208 additions and 1 deletions

View File

@ -4,6 +4,7 @@ import { BaseDbService } from '../commons/services/base-db.service';
import { Repository } from 'typeorm';
import { CreateProjectInput } from './dtos/create-project.input';
import { Project } from './project.entity';
import { UpdateProjectInput } from './dtos/update-project.input';
@Injectable()
export class ProjectsService extends BaseDbService<Project> {
@ -24,7 +25,7 @@ export class ProjectsService extends BaseDbService<Project> {
return await this.repository.save(this.repository.create(dto));
}
async update(id: string, dto: CreateProjectInput) {
async update(id: string, dto: UpdateProjectInput) {
await this.isDuplicateEntityForUpdate(id, dto);
const old = await this.findOne(id);
return await this.repository.save(this.repository.merge(old, dto));