Skip to content
This repository has been archived by the owner on Nov 5, 2020. It is now read-only.

telemark/avtale-service

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

92 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status js-standard-style

avtale-service

microservice for agreements

API

All API calls needs an Authorization header with valid jwt

$ http GET https://agreements.service.io/agreements/5ac770926ae9e948ebc0bb47 'Authorization: Bearer <INSERT TOKEN>'

PUT /agreements

Add a new agreement

$ http PUT https://agreements.service.io/agreements userid=12345 agreementId=98765 'Authorization: Bearer <INSERT TOKEN>'

GET /agreements/:id

Get a specific agreement

$ http GET https://agreements.service.io/agreements/5ac770926ae9e948ebc0bb47 'Authorization: Bearer <INSERT TOKEN>'

POST /agreements/:id

Updates agreement

$ http POST https://agreements.service.io/agreements/5ac770926ae9e948ebc0bb47 status=signed 'Authorization: Bearer <INSERT TOKEN>'

POST /agreements/search

Search agreements

$ http POST https://agreements.service.io/agreements/search status=signed 'Authorization: Bearer <INSERT TOKEN>'

Deployment - ZEIT/Now

Change content of production.env to match your environment.

Change content of now:alias in package.json to match your domains.

Deploy service.

$ npm run deploy

License

MIT