Skip to content
This repository has been archived by the owner on Apr 7, 2023. It is now read-only.

Commit

Permalink
fix(schema): use PunishmentProvider in 'punishment' schema type
Browse files Browse the repository at this point in the history
  • Loading branch information
cAttte committed Nov 19, 2020
1 parent ded8659 commit 6cbd31f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/schema/punishment.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import Joi from "joi"
import PunishmentAction from "../struct/action/PunishmentAction"
import PunishmentProvider from "../struct/PunishmentProvider"

export default Joi.string().custom(value => {
const result = PunishmentAction.parsePunishment(value)
const result = new PunishmentProvider(null).parsePunishment(value)
if (result instanceof Error) throw result
else return result
})

0 comments on commit 6cbd31f

Please sign in to comment.