diff --git a/src/entities/info.ts b/src/entities/info.ts index 0fdc04c..510814e 100644 --- a/src/entities/info.ts +++ b/src/entities/info.ts @@ -1,12 +1,12 @@ export interface RequestInfo { - url: string; - method: string; - body: string; - headers: { [key: string]: string }; + readonly url: string; + readonly method: string; + readonly body: string; + readonly headers: { [key: string]: string }; } export interface ResponseInfo { - status: number; - body: string; - headers: { [key: string]: string }; + readonly status: number; + readonly body: string; + readonly headers: { [key: string]: string }; } diff --git a/src/entities/management.ts b/src/entities/management.ts index ee628ca..d56516d 100644 --- a/src/entities/management.ts +++ b/src/entities/management.ts @@ -1,25 +1,25 @@ export interface Project { - uuid: string; - name: string; - sections: ProjectSection[]; - specs: ProjectRequestSpec[]; + readonly uuid: string; + readonly name: string; + readonly sections: ProjectSection[]; + readonly specs: ProjectRequestSpec[]; } export interface ProjectSection { - uuid: string; - name: string; + readonly uuid: string; + readonly name: string; } export interface ProjectRequestSpec { - uuid: string; - url: string; - method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE"; - headers: ProjectRequestSpecHeader[]; - body: string; + readonly uuid: string; + readonly url: string; + readonly method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE"; + readonly headers: ProjectRequestSpecHeader[]; + readonly body: string; } export interface ProjectRequestSpecHeader { - key: string; - value: string; - isEnabled: boolean; + readonly key: string; + readonly value: string; + readonly isEnabled: boolean; } diff --git a/src/features/project-workspace/ProjectWorkspacePage.tsx b/src/features/project-workspace/ProjectWorkspacePage.tsx index 5d4d6f8..08569e6 100644 --- a/src/features/project-workspace/ProjectWorkspacePage.tsx +++ b/src/features/project-workspace/ProjectWorkspacePage.tsx @@ -401,7 +401,7 @@ const HTTP_METHODS: Array = [ "PUT", "PATCH", "DELETE", -] as const; +]; function CreateRequestSpecButton() { const { create } = useRequestsSpecs();