Skip to content

Commit dacf998

Browse files
Merge pull request #452 from JorgenVatle/patch-auth-response-handlers
Correct issue with service name comparison in auth responseHandler()
2 parents c3ac2ee + c5ad6dd commit dacf998

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/auth-module/auth-module.actions.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ eslint
44
@typescript-eslint/no-explicit-any: 0
55
*/
66
import { globalModels as models } from '../service-module/global-models'
7+
import { getNameFromPath } from '../utils'
78

89
export default function makeAuthActions(feathersClient) {
910
return {
@@ -38,7 +39,7 @@ export default function makeAuthActions(feathersClient) {
3839
if (state.serverAlias && state.userService) {
3940
const Model = Object.keys(models[state.serverAlias])
4041
.map(modelName => models[state.serverAlias][modelName])
41-
.find(model => model.servicePath === state.userService)
42+
.find(model => getNameFromPath(model.servicePath) === getNameFromPath(state.userService))
4243
if (Model) {
4344
user = new Model(user)
4445
}

0 commit comments

Comments
 (0)