Add client side ownership protection for profile editing

This commit is contained in:
Kurt Hutten
2020-11-06 21:33:57 +11:00
parent 9ab61924dc
commit 606cf8eae8
2 changed files with 10 additions and 3 deletions

View File

@@ -8,14 +8,12 @@ export const users = () => {
}
export const user = ({ id }) => {
requireAuth()
return db.user.findOne({
where: { id },
})
}
export const userName = ({ userName }) => {
requireAuth()
return db.user.findOne({
where: { userName },
})