Hinzufügen und Löschen Dialoge in den Tabellen hinzugefügt
This commit is contained in:
@@ -13,10 +13,10 @@ export const createLanguage = async (language: Language): Promise<Language> => {
|
||||
return ky.post(`http://localhost:8088/language`, { json: language }).json<Language>()
|
||||
}
|
||||
|
||||
export const updateLanguage = async (language: Language): Promise<Language> => {
|
||||
return ky.put(`http://localhost:8088/language`, { json: language }).json<Language>()
|
||||
export const updateLanguage = async (language: Language): Promise<void> => {
|
||||
await ky.put(`http://localhost:8088/language`, { json: language })
|
||||
}
|
||||
|
||||
export const deleteLanguage = async (id: number): Promise<void> => {
|
||||
return ky.delete(`http://localhost:8088/language/${id}`).json<void>()
|
||||
await ky.delete(`http://localhost:8088/language/${id}`)
|
||||
}
|
||||
|
||||
@@ -1,22 +1,22 @@
|
||||
import ky from 'ky'
|
||||
import type { propertyGroup } from '../../data/propertyGroup'
|
||||
import type { PropertyGroup } from '../../data/propertyGroup'
|
||||
|
||||
export const getPropertyGroups = async (): Promise<propertyGroup[]> => {
|
||||
return ky.get(`http://localhost:8088/propertygroups`).json<propertyGroup[]>()
|
||||
export const getPropertyGroups = async (): Promise<PropertyGroup[]> => {
|
||||
return ky.get(`http://localhost:8088/propertygroups`).json<PropertyGroup[]>()
|
||||
}
|
||||
|
||||
export const getPropertyGroupById = async (id: number): Promise<propertyGroup> => {
|
||||
return ky.get(`http://localhost:8088/propertygroup/${id}`).json<propertyGroup>()
|
||||
export const getPropertyGroupById = async (id: number): Promise<PropertyGroup> => {
|
||||
return ky.get(`http://localhost:8088/propertygroup/${id}`).json<PropertyGroup>()
|
||||
}
|
||||
|
||||
export const createPropertyGroup = async (propertyGroup: propertyGroup): Promise<propertyGroup> => {
|
||||
return ky.post(`http://localhost:8088/propertygroup`, { json: propertyGroup }).json<propertyGroup>()
|
||||
export const createPropertyGroup = async (propertyGroup: PropertyGroup): Promise<PropertyGroup> => {
|
||||
return ky.post(`http://localhost:8088/propertygroup`, { json: propertyGroup }).json<PropertyGroup>()
|
||||
}
|
||||
|
||||
export const updatePropertyGroup = async (propertyGroup: propertyGroup): Promise<propertyGroup> => {
|
||||
return ky.put(`http://localhost:8088/propertygroup`, { json: propertyGroup }).json<propertyGroup>()
|
||||
export const updatePropertyGroup = async (propertyGroup: PropertyGroup): Promise<void> => {
|
||||
await ky.put(`http://localhost:8088/propertygroup`, { json: propertyGroup })
|
||||
}
|
||||
|
||||
export const deletePropertyGroup = async (id: number): Promise<void> => {
|
||||
return ky.delete(`http://localhost:8088/propertygroup/${id}`).json<void>()
|
||||
await ky.delete(`http://localhost:8088/propertygroup/${id}`)
|
||||
}
|
||||
|
||||
@@ -13,12 +13,12 @@ export const createPropertyType = async (propertyType: PropertyType): Promise<Pr
|
||||
return ky.post(`http://localhost:8088/propertytype`, { json: propertyType }).json<PropertyType>()
|
||||
}
|
||||
|
||||
export const updatePropertyType = async (propertyType: PropertyType): Promise<PropertyType> => {
|
||||
return ky.put(`http://localhost:8088/propertytype`, { json: propertyType }).json<PropertyType>()
|
||||
export const updatePropertyType = async (propertyType: PropertyType): Promise<void> => {
|
||||
await ky.put(`http://localhost:8088/propertytype`, { json: propertyType })
|
||||
}
|
||||
|
||||
export const deletePropertyType = async (id: number): Promise<void> => {
|
||||
return ky.delete(`http://localhost:8088/propertytype/${id}`).json<void>()
|
||||
await ky.delete(`http://localhost:8088/propertytype/${id}`)
|
||||
}
|
||||
|
||||
export const getPropertyTypesByPropertyGroupId = async (propertyGroupId: number): Promise<PropertyType[]> => {
|
||||
|
||||
@@ -13,12 +13,12 @@ export const createTranslation = async (translation: Translation): Promise<Trans
|
||||
return ky.post(`http://localhost:8088/translation`, { json: translation }).json<Translation>()
|
||||
}
|
||||
|
||||
export const updateTranslation = async (translation: Translation): Promise<Translation> => {
|
||||
return ky.put(`http://localhost:8088/translation`, { json: translation }).json<Translation>()
|
||||
export const updateTranslation = async (translation: Translation): Promise<void> => {
|
||||
await ky.put(`http://localhost:8088/translation`, { json: translation })
|
||||
}
|
||||
|
||||
export const deleteTranslation = async (id: number): Promise<void> => {
|
||||
return ky.delete(`http://localhost:8088/translation/${id}`).json<void>()
|
||||
await ky.delete(`http://localhost:8088/translation/${id}`)
|
||||
}
|
||||
|
||||
export const getTranslationsByLanguageId = async (language_id: number): Promise<Translation[]> => {
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
import ky from 'ky'
|
||||
import type { ValueComplexity } from '../../data/valueComplexity'
|
||||
|
||||
export const getValueComplexities = async (): Promise<ValueComplexity[]> => {
|
||||
return ky.get(`http://localhost:8088/valuecomplexities`).json<ValueComplexity[]>()
|
||||
}
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
import ky from 'ky'
|
||||
import type { ValueType } from '../../data/valueType'
|
||||
|
||||
export const getValueTypes = async (): Promise<ValueType[]> => {
|
||||
return ky.get(`http://localhost:8088/valuetypes`).json<ValueType[]>()
|
||||
}
|
||||
|
||||
export const getValueTypeById = async (id: number): Promise<ValueType> => {
|
||||
return ky.get(`http://localhost:8088/valuetype/${id}`).json<ValueType>()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user