1
0
mirror of https://github.com/flarum/core.git synced 2025-10-12 15:34:26 +02:00

Slug Driver Support (#2456)

- Support slug drivers for core's sluggable models, easily extends to other models
- Add automated testing for affected single-model API routes
- Fix nickname selection UI
- Serialize slugs as `slug` attribute
- Make min search length a constant
This commit is contained in:
Matt Kilgore
2020-12-07 13:33:42 -05:00
committed by GitHub
parent ef4bf8128e
commit 4679448300
27 changed files with 671 additions and 58 deletions

View File

@@ -10,6 +10,7 @@ export default class User extends Model {}
Object.assign(User.prototype, {
username: Model.attribute('username'),
slug: Model.attribute('slug'),
displayName: Model.attribute('displayName'),
email: Model.attribute('email'),
isEmailConfirmed: Model.attribute('isEmailConfirmed'),