From 6280b0293456de4b0148b49cbc1f473aaa72a57e Mon Sep 17 00:00:00 2001 From: Julien Oculi Date: Mon, 13 May 2024 18:01:54 +0200 Subject: [PATCH] fix(model): :bug: update enpoint for default rest `ref` resolver --- src/models/utils/ref.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/models/utils/ref.ts b/src/models/utils/ref.ts index 818e3c6..a78afeb 100644 --- a/src/models/utils/ref.ts +++ b/src/models/utils/ref.ts @@ -47,7 +47,7 @@ export class Ref extends String { static restResolver(endpoint: string | URL) { return async (ref: RefString) => { const { type, uuid } = Ref.parse(ref) - const url = new URL(`${type}/${uuid}`, endpoint) + const url = new URL(`${type}s/${uuid}`, endpoint) const response = await fetch(url) const json = await response.json()