Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/backend/src/actors/FingerprintStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ export class FingerprintStore extends SubscribableActor<Fingerprint, Fingerprint
this.storeEntity({...fp, blocked: true});
this.updateSubscribers({...fp, blocked: true})
if (uid)
this.send("actors://recapp-backend/UserStore", UserStoreMessages.Update({ uid: fp.uid, active: false }));
this.send("actors://recapp-backend/UserStore", UserStoreMessages.Update({ uid, active: false }));
return unit();
},
() => {
Expand All @@ -89,7 +89,7 @@ export class FingerprintStore extends SubscribableActor<Fingerprint, Fingerprint
this.storeEntity({...fp, blocked: false});
this.updateSubscribers({...fp, blocked: false})
if (uid)
this.send("actors://recapp-backend/UserStore", UserStoreMessages.Update({ uid: fp.uid, active: true }));
this.send("actors://recapp-backend/UserStore", UserStoreMessages.Update({ uid, active: true }));
return unit();
},
() => {
Expand Down
4 changes: 2 additions & 2 deletions packages/backend/src/middlewares/authMiddleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@ export const authenticationMiddleware = (request: IncomingMessage, next: (err: E
.map(bearerValid)
.orElse(Promise.resolve("" as Id)) as Promise<Id>;
tokenValid
.then(uid => {
.then(async uid => {
if (!uid) {
next(authorizationError());
return;
}
Container.get<ActorSystem>("actor-system").send(
await Container.get<ActorSystem>("actor-system").ask(
createActorUri("SessionStore"),
SessionStoreMessages.StoreSession({ uid, actorSystem })
);
Expand Down
Loading