Albums: Shorten the URL by replacing the slug with "view"

Signed-off-by: Michael Mayer <michael@photoprism.app>
This commit is contained in:
Michael Mayer 2023-02-04 07:25:13 +01:00
parent 4258b94955
commit 3e8bf2d618
2 changed files with 2 additions and 2 deletions

View file

@ -68,7 +68,7 @@ export class Album extends RestModel {
route(view) {
return {
name: view,
params: { uid: this.UID, slug: this.Slug, year: this.Year, month: this.Month },
params: { uid: this.UID, slug: "view", year: this.Year, month: this.Month },
};
}

View file

@ -10,7 +10,7 @@ describe("model/album", () => {
const album = new Album(values);
const result = album.route("test");
assert.equal(result.name, "test");
assert.equal(result.params.slug, "christmas-2019");
assert.equal(result.params.slug, "view");
});
it("should return classes", () => {