Skip to content

Commit 3a446d3

Browse files
committed
Removes the uniqueUsername route
1 parent e4eea18 commit 3a446d3

2 files changed

Lines changed: 6 additions & 16 deletions

File tree

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@
66

77
* Custom operations registered with `addCreateWidgetOperation` can now specify an `ifTypesIntersect` property containing an array of widget type names. If the area in question allows at least one, the operation is offered.
88

9+
### Fixes
10+
11+
### Changes
12+
13+
* Removes the non-functional `uniqueUsername` route from the `user` module
14+
915
## 4.21.0 (2025-09-03)
1016

1117
### Adds

modules/@apostrophecms/user/index.js

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -186,22 +186,6 @@ module.exports = {
186186
self.addLegacyMigrations();
187187
await self.ensureSafe();
188188
},
189-
apiRoutes(self) {
190-
return {
191-
post: {
192-
async uniqueUsername(req) {
193-
const username = self.apos.launder.string(req.body.username);
194-
const user = self.find(req, { username }).project({
195-
_id: 1,
196-
username: 1
197-
}).toObject();
198-
if (user) {
199-
throw self.apos.error('conflict');
200-
}
201-
}
202-
}
203-
};
204-
},
205189
handlers(self) {
206190
return {
207191
beforeInsert: {

0 commit comments

Comments
 (0)