feat(pipelines): 添加流水线模块。
This commit is contained in:
@ -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));
|
||||
|
Reference in New Issue
Block a user