First almost fully functioning MVP.
Lacking: - Seasons cannot be added/edited - image upload - layout recipe/adding
This commit is contained in:
@ -12,12 +12,14 @@ export const POST: RequestHandler = async ({request}) => {
|
||||
console.log("RECIPE:", recipe_json)
|
||||
console.log("BEARER:", bearer_token)
|
||||
if(bearer_token === BEARER_TOKEN){
|
||||
console.log("PASSWORD CORRECT")
|
||||
await dbConnect();
|
||||
await Recipe.create(recipe_json);
|
||||
await dbDisconnect();
|
||||
return {status: 400}
|
||||
return {status: 400} //TODO: cleanup error throwing
|
||||
}
|
||||
else{
|
||||
console.log("PASSWORD INCORRECT")
|
||||
return {status: 403}
|
||||
}
|
||||
};
|
||||
|
Reference in New Issue
Block a user