nobejs / discuss

Discuss on any topic
0 stars 1 forks source link

worked on create query story #2

Closed rohan099 closed 2 years ago

rjvim commented 2 years ago

You need to pass Authorization token in header. You can generate a token using genuser command which is in package.json

On Mon, 27 Dec 2021 at 7:59 PM, Rohan Sharma @.***> wrote:

@.**** commented on this pull request.

In src/stories/UserCanCreateQueries/story.js https://github.com/nobejs/discuss/pull/2#discussion_r775512597:

@@ -0,0 +1,63 @@ +const validator = requireValidator(); +const QueryRepo = requireRepo("query"); +const QuerySerializer = requireSerializer("query"); +const findKeysFromRequest = requireUtil("findKeysFromRequest"); + +const prepare = ({ reqQuery, reqBody, reqParams, req }) => {

  • const payload = findKeysFromRequest(req, ["title", "anonymous"]);
  • console.log(req.user,"useruser")
  • payload["owner_uuid"] = "01"

ok i tried req.user but it was coming undefined

— Reply to this email directly, view it on GitHub https://github.com/nobejs/discuss/pull/2#discussion_r775512597, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFT4WPYFYGMTMCUORJGW323UTBXD7ANCNFSM5K2LGB7A . You are receiving this because your review was requested.Message ID: @.***>

-- Rajiv Seelam

Software Architect, Co-Founder

Betalectic http://betalectic.com +91 - 8790887656