technobyte-nitkkr / Blogs

Blogs by Technobyte
0 stars 39 forks source link

[API] POST admin #15

Closed Himasnhu-AT closed 4 months ago

Himasnhu-AT commented 5 months ago

@@ADMIN ONLY

Workflow to ensure admin only access this:

// get auth_token from cookie

const { userId, email } = requestDataFromJWTToken(auth_token)

const user = findUniqueUser(id, email)

if ( user.type != admin) 
  return 'Unauthorized'

// continue
Debatreya commented 5 months ago

@Debatreya

Debatreya commented 5 months ago

2nd Year:

nototiger0227 commented 5 months ago

Hi! I am Vansh Gupta.

MuditGargg commented 5 months ago

Hii! I am Mudit Garg

Debatreya commented 5 months ago

Hi, Vansh and Mudit. Go throught the dev-docs rn, we will clear every thing in the meet tomorrow.

dev-docs.md

Debatreya commented 5 months ago

https://github.com/Debatreya/Blogs

@MuditGargg @nototiger0227 Fork this repo☝️

Debatreya commented 5 months ago

@Himasnhu-AT yeh ek middleware hain nah??

Himasnhu-AT commented 5 months ago

@Debatreya yup. But here's what it should return:

Format:

{
    "published_blogs": [],
    "review": [],
    "updated_review": []
}
Debatreya commented 5 months ago

Okay. Great...

Debatreya commented 5 months ago

@nototiger0227 @MuditGargg fork nhi Kiya abhi bhi?

nototiger0227 commented 5 months ago

@Debatreya and @Himasnhu-AT sir I've read the docs and I've understood logical working of the project also.

What is this code given in this comment for? https://github.com/technobyte-nitkkr/Blogs/issues/15#issue-2321546332

As much as I've understood,I think this is the required logic to be implemented in JS to provide admin only access . But I don't know where to put this code in our project files ?

Debatreya commented 5 months ago

Yeh. Let's have a meet tomorrow. When will you be free?

nototiger0227 commented 5 months ago

Lets meet at 11am?

Debatreya commented 5 months ago

Lets meet at 11am?

Fine: Meet Click on it. And share the link here..

nototiger0227 commented 5 months ago

Sir, This creates a new issue? image

Debatreya commented 5 months ago

Sir, This creates a new issue? image

Koi ni close kr dunga

nototiger0227 commented 5 months ago

Sir yehi karna tha na?

nototiger0227 commented 5 months ago

Sir, This creates a new issue? image

Koi ni close kr dunga

okay sir

Debatreya commented 5 months ago

Sir yehi karna tha na?

Koi ni, mujhe bhi pta nhi.

Actually meet.new se new gmeet create ho jati hain. Mein bhi pehli baar kr rha hu

nototiger0227 commented 5 months ago

Sir yehi karna tha na?

Koi ni, mujhe bhi pta nhi.

Actually meet.new se new gmeet create ho jati hain. Mein bhi pehli baar kr rha hu

Ok sir

Debatreya commented 4 months ago

@nototiger0227 what's the status?

RiyaRaj28 commented 4 months ago

@Debatreya and @Himasnhu-AT sir I've read the docs and I've understood logical working of the project also.

What is this code given in this comment for? #15 (comment)

As much as I've understood,I think this is the required logic to be implemented in JS to provide admin only access . But I don't know where to put this code in our project files ?

@Debatreya sir I've this same doubt

Debatreya commented 4 months ago

Hi @RiyaRaj28 , in which issue are you working on? Does it depend on this ?

Debatreya commented 4 months ago

@Debatreya and @Himasnhu-AT sir I've read the docs and I've understood logical working of the project also. What is this code given in this comment for? #15 (comment) As much as I've understood,I think this is the required logic to be implemented in JS to provide admin only access . But I don't know where to put this code in our project files ?

@Debatreya sir I've this same doubt

Mostly, The modules are independent, but if you have this doubt, ig its better to have a meet tomorrow,

RiyaRaj28 commented 4 months ago

Hi @RiyaRaj28 , in which issue are you working on? Does it depend on this ?

Yes sir, I've been assigned issue 16 and it depends on this. Okay, I'm up for the meet whenever you say.

Debatreya commented 4 months ago

Hi @RiyaRaj28 , in which issue are you working on? Does it depend on this ?

Yes sir, I've been assigned issue 16 and it depends on this. Okay, I'm up for the meet whenever you say.

Sure. After Lunch, 2pm afterwards. @Saanvi26 would you like to join?

Debatreya commented 4 months ago

@MuditGargg hi bro? What's going on? Will you be working on this or want to have a glimpse of what's going on?.?

We are having a meet today noon. Feel free to contact me if you are willing.

MuditGargg commented 4 months ago

Hello @Debatreya sir. Sorry for being inactive for the past few weeks. I haven't been able to work due to some reasons. I'll try to join the meeting today and catch up with everything that's going on.

RiyaRaj28 commented 4 months ago

Hi @RiyaRaj28 , in which issue are you working on? Does it depend on this ?

Yes sir, I've been assigned issue 16 and it depends on this. Okay, I'm up for the meet whenever you say.

Sure. After Lunch, 2pm afterwards. @Saanvi26 would you like to join?

Okay, at 2.30?

Debatreya commented 4 months ago

@RiyaRaj28 @MuditGargg I will dm you the link.

RiyaRaj28 commented 4 months ago

@RiyaRaj28 @MuditGargg I will dm you the link.

okay

Himasnhu-AT commented 4 months ago

@nototiger0227 close the pl #35

Great work guys on closing this issue :)