mirror of
https://github.com/overleaf/overleaf.git
synced 2024-12-23 17:42:18 +00:00
ee85d948e2
GitOrigin-RevId: ef2ef77e26df59d1af3df6dc664e284d3c70102d
12 lines
242 B
JavaScript
12 lines
242 B
JavaScript
import { celebrate, errors } from 'celebrate'
|
|
|
|
export { Joi } from 'celebrate'
|
|
|
|
export const errorMiddleware = errors()
|
|
|
|
/**
|
|
* Validation middleware
|
|
*/
|
|
export function validate(schema) {
|
|
return celebrate(schema, { allowUnknown: true })
|
|
}
|