8000 Meteor 1.4 restapi by huneau · Pull Request #1033 · wekan/wekan · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Meteor 1.4 restapi #1033

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
May 13, 2017
Merged

Meteor 1.4 restapi #1033

merged 4 commits into from
May 13, 2017

Conversation

huneau
Copy link
Contributor
@huneau huneau commented May 10, 2017

Hi there,

I have added checklist and card comment for restapi.

And delete console.log.


This change is Reviewable

@huneau
Copy link
Contributor Author
huneau commented May 11, 2017

Hi there,

I fix #1032

I use https://atmospherejs.com/simple/rest-accounts-password it's pretty simple to use is.

To use api you should get a token
POST /users/login or POST /users/register (not /api in front).
With in payload for /login

{
  "username": "huneau",
  "password": "my awesome password"
}

Or for /register

{
  "username": "huneau",
  "email": "example@mail.com",
  "password": "my awesome password"
}

This thing will return a token where you have to put it everywhere.

{
  "token": "string",
  "tokenExpires": "ISO encoded date string",
  "id": "user id"
}

Just add your token to your reauest header like Authorization: Bearer <token>
or

HTTP.post("/api/resources", {
  headers: { Authorization: "Bearer " + token }
}, function (err, res) {
  console.log(res.data);
});

/!\ Just keep in mind ONLY admin user can use RESTAPI.

@xet7 xet7 merged commit c0ddc89 into wekan:meteor-1.4 May 13, 2017
@ghost ghost mentioned this pull request Sep 13, 2017
@Digital-Thor
Copy link

I'm trying to learn about Winston. It looks like it was merged and I think it's supposed to be in server/logger.js, but I don't see that file in wekan/wekan. Was it removed due to #1094?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
0