fix(projects): 修复若干问题。

This commit is contained in:
Ivan Li
2021-02-17 14:32:44 +08:00
parent db6b699663
commit c2c5340278
3 changed files with 14 additions and 4 deletions

View File

@ -26,7 +26,8 @@ export class ProjectsService extends BaseDbService<Project> {
async update(id: string, dto: CreateProjectInput) {
await this.isDuplicateEntityForUpdate(id, dto);
await this.repository.update({ id }, dto);
const old = await this.findOne(id);
return await this.repository.save(this.repository.merge(old, dto));
}
async remove(id: string) {