trim mandatory CWs
This commit is contained in:
parent
5cb94e3c60
commit
d960c4b863
3 changed files with 3 additions and 3 deletions
|
|
@ -35,7 +35,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
|||
const instance = await this.federatedInstanceService.fetchOrRegister(ps.host);
|
||||
|
||||
// Collapse empty strings to null
|
||||
const newCW = ps.cw || null;
|
||||
const newCW = ps.cw?.trim() || null;
|
||||
const oldCW = instance.mandatoryCW;
|
||||
|
||||
// Skip if there's nothing to do
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
|||
}) as MiNote & { user: MiUser };
|
||||
|
||||
// Collapse empty strings to null
|
||||
const newCW = ps.cw || null;
|
||||
const newCW = ps.cw?.trim() || null;
|
||||
const oldCW = note.mandatoryCW;
|
||||
|
||||
// Skip if there's nothing to do
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
|||
const user = await this.cacheService.findUserById(ps.userId);
|
||||
|
||||
// Collapse empty strings to null
|
||||
const newCW = ps.cw || null;
|
||||
const newCW = ps.cw?.trim() || null;
|
||||
const oldCW = user.mandatoryCW;
|
||||
|
||||
// Skip if there's nothing to do
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue