소스 검색

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();