fixed userpreference test and added user info to recipe endpoint

This commit is contained in:
vabene1111
2024-12-19 20:08:13 +01:00
parent b9e5126ab4
commit ecdb1e9fee
10 changed files with 1855 additions and 31 deletions

View File

@@ -8,7 +8,7 @@
:recipe="props.recipe"
>
<template #overlay>
<v-chip class="ms-2" color="primary" variant="flat" size="x-small">by {{ props.recipe.createdBy }}</v-chip>
<v-chip class="ms-2" color="primary" variant="flat" size="x-small">by {{ props.recipe.createdBy.displayName }}</v-chip>
<keywords-component variant="flat" class="ms-1 mb-2" :keywords="props.recipe.keywords"></keywords-component>
</template>
</recipe-image>

View File

@@ -7,6 +7,8 @@ models/AccessToken.ts
models/AuthToken.ts
models/AutoMealPlan.ts
models/Automation.ts
models/AutomationTypeEnum.ts
models/BaseUnitEnum.ts
models/BookmarkletImport.ts
models/BookmarkletImportList.ts
models/ConnectorConfigConfig.ts
@@ -32,6 +34,16 @@ models/MealPlan.ts
models/MealType.ts
models/MethodEnum.ts
models/NutritionInformation.ts
models/OpenDataCategory.ts
models/OpenDataConversion.ts
models/OpenDataFood.ts
models/OpenDataFoodProperty.ts
models/OpenDataProperty.ts
models/OpenDataStore.ts
models/OpenDataStoreCategory.ts
models/OpenDataUnit.ts
models/OpenDataUnitTypeEnum.ts
models/OpenDataVersion.ts
models/PaginatedAutomationList.ts
models/PaginatedBookmarkletImportListList.ts
models/PaginatedCookLogList.ts
@@ -78,6 +90,13 @@ models/PatchedInviteLink.ts
models/PatchedKeyword.ts
models/PatchedMealPlan.ts
models/PatchedMealType.ts
models/PatchedOpenDataCategory.ts
models/PatchedOpenDataConversion.ts
models/PatchedOpenDataFood.ts
models/PatchedOpenDataProperty.ts
models/PatchedOpenDataStore.ts
models/PatchedOpenDataUnit.ts
models/PatchedOpenDataVersion.ts
models/PatchedProperty.ts
models/PatchedPropertyType.ts
models/PatchedRecipe.ts
@@ -135,7 +154,6 @@ models/SupermarketCategoryRelation.ts
models/Sync.ts
models/SyncLog.ts
models/ThemeEnum.ts
models/TypeEnum.ts
models/Unit.ts
models/UnitConversion.ts
models/User.ts

File diff suppressed because it is too large Load Diff

View File

@@ -13,13 +13,13 @@
*/
import { mapValues } from '../runtime';
import type { TypeEnum } from './TypeEnum';
import type { AutomationTypeEnum } from './AutomationTypeEnum';
import {
TypeEnumFromJSON,
TypeEnumFromJSONTyped,
TypeEnumToJSON,
TypeEnumToJSONTyped,
} from './TypeEnum';
AutomationTypeEnumFromJSON,
AutomationTypeEnumFromJSONTyped,
AutomationTypeEnumToJSON,
AutomationTypeEnumToJSONTyped,
} from './AutomationTypeEnum';
/**
*
@@ -35,10 +35,10 @@ export interface Automation {
id?: number;
/**
*
* @type {TypeEnum}
* @type {AutomationTypeEnum}
* @memberof Automation
*/
type: TypeEnum;
type: AutomationTypeEnum;
/**
*
* @type {string}
@@ -111,7 +111,7 @@ export function AutomationFromJSONTyped(json: any, ignoreDiscriminator: boolean)
return {
'id': json['id'] == null ? undefined : json['id'],
'type': TypeEnumFromJSON(json['type']),
'type': AutomationTypeEnumFromJSON(json['type']),
'name': json['name'] == null ? undefined : json['name'],
'description': json['description'] == null ? undefined : json['description'],
'param1': json['param_1'] == null ? undefined : json['param_1'],
@@ -135,7 +135,7 @@ export function AutomationToJSONTyped(value?: Omit<Automation, 'created_by'> | n
return {
'id': value['id'],
'type': TypeEnumToJSON(value['type']),
'type': AutomationTypeEnumToJSON(value['type']),
'name': value['name'],
'description': value['description'],
'param_1': value['param1'],

View File

@@ -13,13 +13,13 @@
*/
import { mapValues } from '../runtime';
import type { TypeEnum } from './TypeEnum';
import type { AutomationTypeEnum } from './AutomationTypeEnum';
import {
TypeEnumFromJSON,
TypeEnumFromJSONTyped,
TypeEnumToJSON,
TypeEnumToJSONTyped,
} from './TypeEnum';
AutomationTypeEnumFromJSON,
AutomationTypeEnumFromJSONTyped,
AutomationTypeEnumToJSON,
AutomationTypeEnumToJSONTyped,
} from './AutomationTypeEnum';
/**
*
@@ -35,10 +35,10 @@ export interface PatchedAutomation {
id?: number;
/**
*
* @type {TypeEnum}
* @type {AutomationTypeEnum}
* @memberof PatchedAutomation
*/
type?: TypeEnum;
type?: AutomationTypeEnum;
/**
*
* @type {string}
@@ -109,7 +109,7 @@ export function PatchedAutomationFromJSONTyped(json: any, ignoreDiscriminator: b
return {
'id': json['id'] == null ? undefined : json['id'],
'type': json['type'] == null ? undefined : TypeEnumFromJSON(json['type']),
'type': json['type'] == null ? undefined : AutomationTypeEnumFromJSON(json['type']),
'name': json['name'] == null ? undefined : json['name'],
'description': json['description'] == null ? undefined : json['description'],
'param1': json['param_1'] == null ? undefined : json['param_1'],
@@ -133,7 +133,7 @@ export function PatchedAutomationToJSONTyped(value?: Omit<PatchedAutomation, 'cr
return {
'id': value['id'],
'type': TypeEnumToJSON(value['type']),
'type': AutomationTypeEnumToJSON(value['type']),
'name': value['name'],
'description': value['description'],
'param_1': value['param1'],

View File

@@ -105,10 +105,10 @@ export interface PatchedRecipe {
waitingTime?: number;
/**
*
* @type {number}
* @type {User}
* @memberof PatchedRecipe
*/
readonly createdBy?: number;
readonly createdBy?: User;
/**
*
* @type {Date}
@@ -226,7 +226,7 @@ export function PatchedRecipeFromJSONTyped(json: any, ignoreDiscriminator: boole
'steps': json['steps'] == null ? undefined : ((json['steps'] as Array<any>).map(StepFromJSON)),
'workingTime': json['working_time'] == null ? undefined : json['working_time'],
'waitingTime': json['waiting_time'] == null ? undefined : json['waiting_time'],
'createdBy': json['created_by'] == null ? undefined : json['created_by'],
'createdBy': json['created_by'] == null ? undefined : UserFromJSON(json['created_by']),
'createdAt': json['created_at'] == null ? undefined : (new Date(json['created_at'])),
'updatedAt': json['updated_at'] == null ? undefined : (new Date(json['updated_at'])),
'sourceUrl': json['source_url'] == null ? undefined : json['source_url'],

View File

@@ -105,10 +105,10 @@ export interface Recipe {
waitingTime?: number;
/**
*
* @type {number}
* @type {User}
* @memberof Recipe
*/
readonly createdBy: number;
readonly createdBy: User;
/**
*
* @type {Date}
@@ -235,7 +235,7 @@ export function RecipeFromJSONTyped(json: any, ignoreDiscriminator: boolean): Re
'steps': ((json['steps'] as Array<any>).map(StepFromJSON)),
'workingTime': json['working_time'] == null ? undefined : json['working_time'],
'waitingTime': json['waiting_time'] == null ? undefined : json['waiting_time'],
'createdBy': json['created_by'],
'createdBy': UserFromJSON(json['created_by']),
'createdAt': (new Date(json['created_at'])),
'updatedAt': (new Date(json['updated_at'])),
'sourceUrl': json['source_url'] == null ? undefined : json['source_url'],

View File

@@ -4,6 +4,8 @@ export * from './AccessToken';
export * from './AuthToken';
export * from './AutoMealPlan';
export * from './Automation';
export * from './AutomationTypeEnum';
export * from './BaseUnitEnum';
export * from './BookmarkletImport';
export * from './BookmarkletImportList';
export * from './ConnectorConfigConfig';
@@ -29,6 +31,16 @@ export * from './MealPlan';
export * from './MealType';
export * from './MethodEnum';
export * from './NutritionInformation';
export * from './OpenDataCategory';
export * from './OpenDataConversion';
export * from './OpenDataFood';
export * from './OpenDataFoodProperty';
export * from './OpenDataProperty';
export * from './OpenDataStore';
export * from './OpenDataStoreCategory';
export * from './OpenDataUnit';
export * from './OpenDataUnitTypeEnum';
export * from './OpenDataVersion';
export * from './PaginatedAutomationList';
export * from './PaginatedBookmarkletImportListList';
export * from './PaginatedCookLogList';
@@ -75,6 +87,13 @@ export * from './PatchedInviteLink';
export * from './PatchedKeyword';
export * from './PatchedMealPlan';
export * from './PatchedMealType';
export * from './PatchedOpenDataCategory';
export * from './PatchedOpenDataConversion';
export * from './PatchedOpenDataFood';
export * from './PatchedOpenDataProperty';
export * from './PatchedOpenDataStore';
export * from './PatchedOpenDataUnit';
export * from './PatchedOpenDataVersion';
export * from './PatchedProperty';
export * from './PatchedPropertyType';
export * from './PatchedRecipe';
@@ -132,7 +151,6 @@ export * from './SupermarketCategoryRelation';
export * from './Sync';
export * from './SyncLog';
export * from './ThemeEnum';
export * from './TypeEnum';
export * from './Unit';
export * from './UnitConversion';
export * from './User';