async getDir()

in ui/src/app/services/explore.service.ts [55:69]


  async getDir(path: string, sort: string): Promise<ExploreResult> {
    path = this.normalizePath(path);
    try {
      const json = await requestJson(`/explore/${path}?sort=${sort}`)

      const title = json.path as string;
      const contents = json.contents as MetadataObject[];

      return { title, contents } as ExploreResult;
    } catch (error) {
      console.error(error)
    }

    return {} as ExploreResult;
  }