Skip to content
This repository has been archived by the owner on Jan 17, 2025. It is now read-only.

Commit

Permalink
Om læreren ikke finnes - returner tomt resultat
Browse files Browse the repository at this point in the history
  • Loading branch information
MatsAnd committed Jan 27, 2021
1 parent 2398831 commit aec1a6c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Documents/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@ const handleDocuments = async (context, req) => {
// Get current user
logger('info', ['handle-documents', 'user', user, 'get-user'])
const teacherObj = await getMyUser(user)
logger('info', ['handle-documents', 'user', user, 'get-user', 'type', teacherObj.type])
if (teacherObj === false) {
logger('info', ['handle-documents', 'user', user, 'get-user', 'teacher not found'])
return getResponse([])
}

// Retreive all contact students
logger('info', ['handle-documents', 'user', user, 'get-students'])
Expand Down

0 comments on commit aec1a6c

Please # to comment.