Formatting

This commit is contained in:
Kurt Hutten
2021-06-29 17:17:21 +10:00
parent 726945c2ab
commit 7417499d4b
11 changed files with 92 additions and 66 deletions

View File

@@ -121,7 +121,7 @@ export const getCurrentUser = async (decoded, { _token, _type }) => {
* requireAuth({ role: ['editor', 'author'] })
* requireAuth({ role: ['publisher'] })
*/
export const requireAuth = ({ role }: {role?: string | string[]} = {}) => {
export const requireAuth = ({ role }: { role?: string | string[] } = {}) => {
console.log(context.currentUser)
if (!context.currentUser) {
throw new AuthenticationError("You don't have permission to do that.")