ATlast — you'll never need to find your favorites on another platform again. Find your favs in the ATmosphere.
atproto
16
fork

Configure Feed

Select the types of activity you want to include in your feed.

chore: remove unused scaffolds for user model

byarielm.fyi f1cf3566 b557f94e

verified
+2 -33
+1 -13
app/models/user.ts
··· 1 1 import { UserSchema } from '#database/schema' 2 - import hash from '@adonisjs/core/services/hash' 3 - import { compose } from '@adonisjs/core/helpers' 4 - import { withAuthFinder } from '@adonisjs/auth/mixins/lucid' 5 2 6 - export default class User extends compose(UserSchema, withAuthFinder(hash)) { 7 - get initials() { 8 - const [first, last] = this.fullName ? this.fullName.split(' ') : this.email.split('@') 9 - if (first && last) { 10 - return `${first.charAt(0)}${last.charAt(0)}`.toUpperCase() 11 - } 12 - 13 - return `${first.slice(0, 2)}`.toUpperCase() 14 - } 15 - } 3 + export default class User extends UserSchema {}
+1 -8
app/transformers/user_transformer.ts
··· 3 3 4 4 export default class UserTransformer extends BaseTransformer<User> { 5 5 toObject() { 6 - return this.pick(this.resource, [ 7 - 'id', 8 - 'fullName', 9 - 'email', 10 - 'createdAt', 11 - 'updatedAt', 12 - 'initials', 13 - ]) 6 + return this.pick(this.resource, []) 14 7 } 15 8 }
-12
app/validators/user.ts
··· 1 - import vine from '@vinejs/vine' 2 - 3 - const email = () => vine.string().email().maxLength(254) 4 - const password = () => vine.string().minLength(8).maxLength(32) 5 - 6 - export const signupValidator = vine.create({ 7 - fullName: vine.string().nullable(), 8 - email: email().unique({ table: 'users', column: 'email' }), 9 - password: password().confirmed({ 10 - confirmationField: 'passwordConfirmation', 11 - }), 12 - })