diff --git a/frontend/src/components/daily_recipe_detail.vue b/frontend/src/components/daily_recipe_detail.vue
index efd2311..d28fedc 100644
--- a/frontend/src/components/daily_recipe_detail.vue
+++ b/frontend/src/components/daily_recipe_detail.vue
@@ -37,6 +37,14 @@
+
+ 重新生成
+
diff --git a/frontend/src/components/week_recipe.vue b/frontend/src/components/week_recipe.vue
index 8802566..e0af898 100644
--- a/frontend/src/components/week_recipe.vue
+++ b/frontend/src/components/week_recipe.vue
@@ -41,7 +41,7 @@
>
-
+
编辑
diff --git a/recipe/views.py b/recipe/views.py
index 0595d45..e2444e1 100644
--- a/recipe/views.py
+++ b/recipe/views.py
@@ -69,3 +69,8 @@ class DailyRecipeAPI(rest_framework.generics.RetrieveUpdateAPIView):
queryset = recipe.models.DailyRecipe.objects.all()
serializer_class = recipe.serializers.DailyRecipeSerializer
+
+ def post(self, request, *args, **kwargs):
+ daily_recipe = recipe.models.DailyRecipe.objects.get(id=kwargs['pk'])
+ daily_recipe.generate_recipe()
+ return Response({}, status=status.HTTP_201_CREATED, headers={})