Skip to content

Commit c5ad6dd

Browse files
Use getNameFromPath over getShortName in auth-module-actions model service name comparison
Co-Authored-By: fratzinger <[email protected]>
1 parent 948de13 commit c5ad6dd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

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

99
export default function makeAuthActions(feathersClient) {
1010
return {
@@ -39,7 +39,7 @@ export default function makeAuthActions(feathersClient) {
3939
if (state.serverAlias && state.userService) {
4040
const Model = Object.keys(models[state.serverAlias])
4141
.map(modelName => models[state.serverAlias][modelName])
42-
.find(model => getShortName(model.servicePath) === getShortName(state.userService))
42+
.find(model => getNameFromPath(model.servicePath) === getNameFromPath(state.userService))
4343
if (Model) {
4444
user = new Model(user)
4545
}

0 commit comments

Comments
 (0)