You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
13 lines
329 B
13 lines
329 B
import User from "@/model/User";
|
|
|
|
export default async function validate(decoded, request, h) {
|
|
if (decoded.id) {
|
|
const result = await User.findOne({ where: { id: decoded.id } });
|
|
if (result == null) {
|
|
return { isValid: false };
|
|
}
|
|
return { isValid: true };
|
|
} else {
|
|
return { isValid: false };
|
|
}
|
|
}
|
|
|