фикс редактирования эталона
This commit is contained in:
@@ -23,7 +23,7 @@ export const getStandards = async (): Promise<GetStandardsOutput> => {
|
|||||||
export const getStandard = async (
|
export const getStandard = async (
|
||||||
standardId: string
|
standardId: string
|
||||||
): Promise<GetStandardOutput> => {
|
): Promise<GetStandardOutput> => {
|
||||||
const response = await fetch(`${BASE_URL}/standards/${standardId}/`)
|
const response = await fetch(`${BASE_URL}/standards/${standardId}`)
|
||||||
if (!response.ok) {
|
if (!response.ok) {
|
||||||
throw new Error('Failed to fetch standard')
|
throw new Error('Failed to fetch standard')
|
||||||
}
|
}
|
||||||
@@ -52,7 +52,7 @@ export const patchStandard = async (
|
|||||||
standardId: string,
|
standardId: string,
|
||||||
input: PatchStandardInput
|
input: PatchStandardInput
|
||||||
): Promise<PatchStandardOutput> => {
|
): Promise<PatchStandardOutput> => {
|
||||||
const response = await fetch(`${BASE_URL}/standards/${standardId}/`, {
|
const response = await fetch(`${BASE_URL}/standards/${standardId}`, {
|
||||||
method: 'PATCH',
|
method: 'PATCH',
|
||||||
headers: {
|
headers: {
|
||||||
'Content-Type': 'application/json',
|
'Content-Type': 'application/json',
|
||||||
@@ -69,7 +69,7 @@ export const patchStandard = async (
|
|||||||
export const deleteStandard = async (
|
export const deleteStandard = async (
|
||||||
standardId: string
|
standardId: string
|
||||||
): Promise<{ [key: string]: string }> => {
|
): Promise<{ [key: string]: string }> => {
|
||||||
const response = await fetch(`${BASE_URL}/standards/${standardId}/`, {
|
const response = await fetch(`${BASE_URL}/standards/${standardId}`, {
|
||||||
method: 'DELETE',
|
method: 'DELETE',
|
||||||
})
|
})
|
||||||
if (!response.ok) {
|
if (!response.ok) {
|
||||||
|
|||||||
Reference in New Issue
Block a user