Skip to content

Commit

Permalink
removed-github-env
Browse files Browse the repository at this point in the history
  • Loading branch information
IkkiOcean committed Nov 9, 2024
1 parent 37a5ec8 commit 1ac4692
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 28 deletions.
11 changes: 1 addition & 10 deletions backend/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,7 @@ PORT=8080
# Add your JWT secret token here, it can be anything eg: pineapple
SECRET=""
JWT_TIMEOUT='12h'
# Add your github username
OWNER=""
# Create a public repository and add the name of that repo below
REPO=""
# Add the name of your branch below eg:main
BRANCH=""
# Add your github email id
GITHUB_EMAIL=""
#Add your github access token
TOKEN=""

#Add your email id for communication medium for nodemailer
SMTP_EMAIL=
# Add your SMTP passkey (you need two factor authentication for it and this passkey you need to generate first by following steps :
Expand Down
18 changes: 0 additions & 18 deletions backend/Controllers/RecipeController.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,6 @@ import Comment from "../models/Comment.js";
import axios from "axios";
import User from "../models/User.js";
import mongoose from "mongoose";
import { Octokit } from "@octokit/rest";
import { json } from "express";

const g_owner = process.env.OWNER;
const g_repo = process.env.REPO;
const g_branch = process.env.BRANCH;
const g_email = process.env.GITHUB_EMAIL;

/**
* @route {POST} /api/recipe/add
Expand All @@ -37,13 +30,7 @@ const addRecipe = async (req, res) => {
? lastDocument._id.toString().slice(-4)
: "0000";

// Upload the image to GitHub


// If image upload fails, return an error


// Prepare the recipe data
const data = {
user,
name,
Expand Down Expand Up @@ -123,11 +110,6 @@ const allRecipe = async (req, res) => {
}
};

/**
* @function
* @description Uploads Image to a github repo and returns the downloadable link
* @access private
*/


/**
Expand Down

0 comments on commit 1ac4692

Please sign in to comment.