From 02ce52dbe358e4adbd11db1d0800cec037956b3a Mon Sep 17 00:00:00 2001 From: Hayden <64056131+hay-kot@users.noreply.github.com> Date: Mon, 31 Jul 2023 06:05:37 -0800 Subject: [PATCH] fix: assert/asserts (#521) --- backend/app/api/routes.go | 2 +- frontend/lib/api/classes/assets.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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 }), }); } }