diff --git a/backend/app/api/routes.go b/backend/app/api/routes.go index abf14fd..f0b89f1 100644 --- a/backend/app/api/routes.go +++ b/backend/app/api/routes.go @@ -125,7 +125,7 @@ func (a *app) mountRoutes(r *chi.Mux, chain *errchain.ErrChain, repos *repo.AllR r.Put(v1Base("/items/{id}/maintenance/{entry_id}"), chain.ToHandlerFunc(v1Ctrl.HandleMaintenanceEntryUpdate(), userMW...)) r.Delete(v1Base("/items/{id}/maintenance/{entry_id}"), chain.ToHandlerFunc(v1Ctrl.HandleMaintenanceEntryDelete(), userMW...)) - r.Get(v1Base("/asset/{id}"), chain.ToHandlerFunc(v1Ctrl.HandleAssetGet(), userMW...)) + r.Get(v1Base("/assets/{id}"), chain.ToHandlerFunc(v1Ctrl.HandleAssetGet(), userMW...)) // Notifiers r.Get(v1Base("/notifiers"), chain.ToHandlerFunc(v1Ctrl.HandleGetUserNotifiers(), userMW...)) diff --git a/frontend/lib/api/classes/assets.ts b/frontend/lib/api/classes/assets.ts index 8820bb3..339c4e8 100644 --- a/frontend/lib/api/classes/assets.ts +++ b/frontend/lib/api/classes/assets.ts @@ -5,7 +5,7 @@ import { PaginationResult } from "../types/non-generated"; export class AssetsApi extends BaseAPI { async get(id: string, page = 1, pageSize = 50) { return await this.http.get>({ - url: route(`/asset/${id}`, { page, pageSize }), + url: route(`/assets/${id}`, { page, pageSize }), }); } }