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