소스 검색

Fix resource not found message

Put message key in its correct location.
master
부모
커밋
c55a07fbc2
4개의 변경된 파일19개의 추가작업 그리고 3개의 파일을 삭제
  1. +1
    -1
      packages/core/src/backend/servers/http/core.ts
  2. +9
    -1
      packages/core/src/common/language.ts
  3. +8
    -0
      packages/core/test/utils.ts
  4. +1
    -1
      packages/examples/cms-web-api/bruno/Get Single Post.bru

+ 1
- 1
packages/core/src/backend/servers/http/core.ts 파일 보기

@@ -4,7 +4,7 @@ import {constants} from 'http2';
import * as v from 'valibot';
import {
AllowedMiddlewareSpecification,
BackendState, getAllowString,
BackendState,
Middleware,
RequestContext,
RequestDecorator,


+ 9
- 1
packages/core/src/common/language.ts 파일 보기

@@ -30,6 +30,7 @@ export const LANGUAGE_DEFAULT_ERROR_STATUS_MESSAGE_KEYS = [
'invalidResource',
'notImplemented',
'internalServerError',
'resourceNotFound',
] as const;

export const LANGUAGE_DEFAULT_STATUS_MESSAGE_KEYS = [
@@ -37,7 +38,6 @@ export const LANGUAGE_DEFAULT_STATUS_MESSAGE_KEYS = [
'ok',
'resourceCollectionFetched',
'resourceFetched',
'resourceNotFound',
'resourceDeleted',
'resourcePatched',
'resourceCreated',
@@ -328,5 +328,13 @@ export const FALLBACK_LANGUAGE = {
'Contact the administrator regarding missing configuration or unavailability of dependencies.',
],
],
resourceNotFound: [
'The resource in the provided URL could not be found.',
[
'Check if the request URL is correct.',
'Try the request again at a later time.',
'Contact the administrator regarding missing configuration or unavailability of dependencies.',
],
],
},
} satisfies Language;

+ 8
- 0
packages/core/test/utils.ts 파일 보기

@@ -461,5 +461,13 @@ export const TEST_LANGUAGE: Language = {
'Contact the administrator regarding missing configuration or unavailability of dependencies.',
],
],
resourceNotFound: [
'The resource in the provided URL could not be found.',
[
'Check if the request URL is correct.',
'Try the request again at a later time.',
'Contact the administrator regarding missing configuration or unavailability of dependencies.',
],
],
},
};

+ 1
- 1
packages/examples/cms-web-api/bruno/Get Single Post.bru 파일 보기

@@ -5,7 +5,7 @@ meta {
}

get {
url: http://localhost:6969/api/posts/5fac64d6-d261-42bb-a67b-bc7e1955a7e2
url: http://localhost:6969/api/posts/9ba60691-0cd3-4e8a-9f44-e92b19fcacbc
body: none
auth: none
}

불러오는 중...
취소
저장