Stefano Giraldi
12/07/2021, 3:45 PMObjection.js
(Knex.js) to Prisma.
In Objection.js I've a custom method `verifyPassword`in User Model Class to check password
class User extends Model {
...
// Compares a password to a bcrypt hash, returns whether or not the password was verified.
async verifyPassword (password: string) {
return await bcrypt.compare(password, this.password)
}
...
}
Can I follow the same approach with Prisma or I need to create a custom function outside the model schema?nikolasburk