Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@

* 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.

### Fixes

### Changes

* Removes the non-functional `uniqueUsername` route from the `user` module

## 4.21.0 (2025-09-03)

### Adds
Expand Down
16 changes: 0 additions & 16 deletions modules/@apostrophecms/user/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -186,22 +186,6 @@ module.exports = {
self.addLegacyMigrations();
await self.ensureSafe();
},
apiRoutes(self) {
return {
post: {
async uniqueUsername(req) {
const username = self.apos.launder.string(req.body.username);
const user = self.find(req, { username }).project({
_id: 1,
username: 1
}).toObject();
if (user) {
throw self.apos.error('conflict');
}
}
}
};
},
handlers(self) {
return {
beforeInsert: {
Expand Down
Loading