Skip to content

Commit

Permalink
fix(controller): await setpodurl
Browse files Browse the repository at this point in the history
Makes that the new files are directly available & have their
corresponding permissions
  • Loading branch information
NuttyShrimp committed Nov 22, 2024
1 parent d2fce18 commit cddcf64
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions controller/src/classes/Controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,10 @@ export class Controller<T extends Record<keyof T, BaseSubject<keyof T & string>>
return this.accessRequest;
}

setPodUrl(podUrl: string) {
async setPodUrl(podUrl: string) {
this.index.setPodUrl(podUrl);
this.resources.setPodUrl(podUrl);
this.accessRequest.setPodUrl(podUrl)
await this.accessRequest.setPodUrl(podUrl)
}

unsetPodUrl() {
Expand Down
2 changes: 1 addition & 1 deletion controller/src/types/modules.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export type SubjectConfig<T extends Record<keyof T, BaseSubject<keyof T & string
export type SubjectConfigs<T extends Record<keyof T, BaseSubject<keyof T & string>>> = Record<keyof T, SubjectConfig<T, T[keyof T]>>;

export interface IController<T extends Record<keyof T, BaseSubject<keyof T & string>>> {
setPodUrl(podUrl: string): void;
setPodUrl(podUrl: string): Promise<void>;
unsetPodUrl(podUrl: string): void;
AccessRequest(): IAccessRequest;
getLabelForSubject<K extends SubjectKey<T>>(subject: T[K]): string;
Expand Down
2 changes: 1 addition & 1 deletion loama/src/router/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ router.beforeEach(async (to) => {
if (store.session.info.isLoggedIn) {
// Default to the first pod
const currentPodUrl = (await listPodUrls(store.session))[0]
activeController.setPodUrl(currentPodUrl);
await activeController.setPodUrl(currentPodUrl);
store.setUsedPod(currentPodUrl)
}
if (!store.session.info.isLoggedIn && to.name !== 'login') {
Expand Down

0 comments on commit cddcf64

Please sign in to comment.