Navigation

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Popular
    • Tags
    • Users
    • Groups
    1. Home
    2. Ethan Yu
    • Profile
    • Following
    • Followers
    • Topics
    • Posts
    • Best
    • Groups

    Ethan Yu

    @Ethan Yu

    1
    Reputation
    2
    Posts
    1
    Profile views
    0
    Followers
    0
    Following
    Joined Last Online

    Ethan Yu Follow

    Best posts made by Ethan Yu

    • RE: Category Privileges PUT and DELETE APIs Results Not Reflected

      Hey Baris,

      In my Node.js code with superagent, the privilege should've been groups:posts:downvote rather than group:posts:downvote. I got privileges manipulation to work now!

      posted in Technical Support
      Ethan Yu
      Ethan Yu

    Latest posts made by Ethan Yu

    • RE: Category Privileges PUT and DELETE APIs Results Not Reflected

      Hey Baris,

      In my Node.js code with superagent, the privilege should've been groups:posts:downvote rather than group:posts:downvote. I got privileges manipulation to work now!

      posted in Technical Support
      Ethan Yu
      Ethan Yu
    • Category Privileges PUT and DELETE APIs Results Not Reflected

      Hi all,

      I am trying to use the API from the nodebb-plugin-write-api plugin that adds and deletes group privileges from a category. Whenever I make a call using that API, I get this as my response back:
      {"code":"ok","payload":{}}

      Although it suggests success, the privileges for the specified group in the admin control panel are unchanged. We are first trying to change the privileges for the registered users group for a specific category. Can we get some help and advice on this?

      This is the curl request I am using:
      curl -X DELETE myapp/api/v2/categories/9/privileges --data "privileges[]=groups:posts:downvote&groups[]='registered-users'" -H "Authorization: Bearer X"

      In node with the module 'superagent', I am using:
      superagent
      .delete('myapp/api/v2/categories/9/privileges')
      .send({ privileges: ['group:posts:downvote'], groups: ['registered-users']})
      .set('Authorization', 'Bearer ' + token)
      .then(res => {
      console.log('privileges request went through ' + JSON.stringify(res.body));
      })
      .catch(err =>{
      console.log('Error in privileges: ' + err);
      });

      posted in Technical Support
      Ethan Yu
      Ethan Yu