1
0

merge upstream 2025-02-03

This commit is contained in:
Hazelnoot
2025-02-03 14:31:26 -05:00
264 changed files with 15775 additions and 4919 deletions
@@ -102,15 +102,17 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
}
}
await this.pagesRepository.findBy({
id: Not(ps.pageId),
userId: me.id,
name: ps.name,
}).then(result => {
if (result.length > 0) {
throw new ApiError(meta.errors.nameAlreadyExists);
}
});
if (ps.name != null) {
await this.pagesRepository.findBy({
id: Not(ps.pageId),
userId: me.id,
name: ps.name,
}).then(result => {
if (result.length > 0) {
throw new ApiError(meta.errors.nameAlreadyExists);
}
});
}
await this.pagesRepository.update(page.id, {
updatedAt: new Date(),