-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -144,7 +144,7 @@ const register = async (server: Hapi.Server, options: ExtendedAdminJSOptions) => | |
options: opts, | ||
handler: async (request, h) => { | ||
try { | ||
const loggedInUser = request.auth && request.auth.credentials; | ||
const loggedInUser = request.auth?.credentials?.[0]; | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
dziraf
Author
Contributor
|
||
const controller = new route.Controller({ admin }, loggedInUser); | ||
const ret = await controller[route.action](request, h); | ||
const response = h.response(ret); | ||
|
if using array index, please modify the doc, because the
authenticate
function needs to return the same type, in this way I can get the correct value ofcurrentAdmin
. or instead of object extend.