Albums: Shorten the URL by replacing the slug with "view"
Signed-off-by: Michael Mayer <michael@photoprism.app>
This commit is contained in:
parent
4258b94955
commit
3e8bf2d618
|
@ -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 },
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -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", () => {
|
||||
|
|
Loading…
Reference in a new issue