fix: trim collection name on save rather than on change (#2962)

* fix: trim collection name on save rather than on change

* move trim to server
This commit is contained in:
Nan Yu
2022-01-20 18:53:29 -08:00
committed by GitHub
parent 703708e5d2
commit c2c7a7190c
3 changed files with 4 additions and 4 deletions

View File

@@ -536,7 +536,7 @@ router.post("collections.update", auth(), async (ctx) => {
let sharingChanged = false;
if (name !== undefined) {
collection.name = name;
collection.name = name.trim();
}
if (description !== undefined) {