瀏覽代碼

Default visibility is public

Lee Morgan 1 月之前
父節點
當前提交
9e253a78b1
共有 2 個文件被更改,包括 2 次插入 和 2 次删除
  1. 1 1
      src/routes/recipe/new/+page.svelte
  2. 1 1
      src/routes/recipe/new/+server.js

+ 1 - 1
src/routes/recipe/new/+page.svelte

@@ -8,7 +8,7 @@
         ingredients={[]}
         steps={[]}
         notes=""
-        visibility="private"
+        visibility="public"
         route="/recipe/new"
     />
 </div>

+ 1 - 1
src/routes/recipe/new/+server.js

@@ -29,7 +29,7 @@ export async function POST({request, cookies}){
         notes: body.notes,
         createdAt: new Date(),
         updatedAt: new Date(),
-        private: false
+        private: body.private === true
     });
 
     await recipe.save();