fix: rename dish to meal (#3)
Reviewed-on: #3 Co-authored-by: bdoerfchen <git@bissendorf.co> Co-committed-by: bdoerfchen <git@bissendorf.co>
This commit is contained in:
@ -3,7 +3,7 @@ package cmd
|
||||
import (
|
||||
"context"
|
||||
|
||||
"git.bissendorf.co/bissendorf/unifood/m/v2/core/handler/dishes"
|
||||
"git.bissendorf.co/bissendorf/unifood/m/v2/core/handler/meals"
|
||||
"git.bissendorf.co/bissendorf/unifood/m/v2/core/interfaces"
|
||||
"git.bissendorf.co/bissendorf/unifood/m/v2/core/interfaces/params"
|
||||
"git.bissendorf.co/bissendorf/unifood/m/v2/core/services/stwhbclient"
|
||||
@ -16,17 +16,17 @@ var availableResources = []interfaces.ResourceCommand[any]{
|
||||
{
|
||||
Name: "resources",
|
||||
Aliases: []string{"resource", "r"},
|
||||
Description: "A meta representation of a usable resources of this CLI",
|
||||
Description: "A meta resource representing all other object kinds of this CLI",
|
||||
Verbs: []interfaces.Verb{interfaces.VerbGet},
|
||||
Handler: ®isteredResourcesHandler{},
|
||||
},
|
||||
{
|
||||
Name: "dishes",
|
||||
Aliases: []string{"dish", "d"},
|
||||
Description: "A dish represents a cooked combination of ingredients that can be bought and consumed",
|
||||
Name: "meals",
|
||||
Aliases: []string{"meal", "m"},
|
||||
Description: "A meal represents a cooked combination of ingredients that can be bought and consumed",
|
||||
Verbs: []interfaces.Verb{interfaces.VerbGet},
|
||||
Handler: &dishes.DishesHandler{
|
||||
QueryClient: stwhbclient.New[[]stwbremen.Dish](),
|
||||
Handler: &meals.MealsHandler{
|
||||
QueryClient: stwhbclient.New[[]stwbremen.Meal](),
|
||||
},
|
||||
},
|
||||
}
|
||||
@ -35,7 +35,7 @@ type registeredResourcesHandler struct{}
|
||||
|
||||
func (h *registeredResourcesHandler) Get(ctx context.Context, params params.Container) (*interfaces.ResourceList, error) {
|
||||
return &interfaces.ResourceList{
|
||||
ItemKind: "",
|
||||
ItemKind: resources.ResourceResource,
|
||||
Items: util.Transform(availableResources, func(i *interfaces.ResourceCommand[any]) interfaces.Resource {
|
||||
return &resources.Resource{
|
||||
ResourceName: i.Name,
|
||||
|
||||
Reference in New Issue
Block a user