Skip to content

Conversation

codejockie
Copy link
Owner

#149448565 write api documentation

#### What does this PR do?
#### This PR adds documentation

#### Description of Tasks to be completed
#### N/A

#### How should this be manually tested?
#### N/A

#### Any background context you want to provide?
#### No

#### What are the relevant pivotal tracker stories?
#### Write API Documentation

#### Screenshots (if appropriate)
#### None

#### Questions:
#### None

…-models

Chore/148443911/create database models
update documents, users and search spec files with new jwt token
add .codeclimate.yml
update .travis.yml
update readme

Finishes #149346335
encapsulate the tokens
edit .codeclimate.yml
edit .travis.yml
edit readme

Finishes #149386955
edit helper.js and jwt.js
edit user, document models
edit users test
edit readme
add admin privileges

Finishes #149448565
@coveralls
Copy link

Coverage Status

Changes Unknown when pulling 8951b4a on chore/149448565/write-documentation into ** on staging**.

[![Build Status](https://travis-ci.org/codejockie/document-manager.svg?branch=master)](https://travis-ci.org/codejockie/document-manager)
[![Code Climate](https://codeclimate.com/github/codejockie/document-manager/badges/gpa.svg)](https://codeclimate.com/github/codejockie/document-manager)
[![Coverage Status](https://coveralls.io/repos/github/codejockie/document-manager/badge.svg?branch=master)](https://coveralls.io/github/codejockie/document-manager?branch=master)
[![Test Coverage](https://codeclimate.com/github/codejockie/document-manager/badges/coverage.svg)](https://codeclimate.com/github/codejockie/document-manager/coverage)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the essence of having two coverage badges in your README?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any reason in particular?

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No reason, just a way of getting familiar with using both.

env:
global:
secure: dNoO3Vkh6g4IpO3jRODy1UKa1tr4wLtbAKWbWxGdRcnPcgvKlwCNlVD0T7YMQf8RTsGUoBPDE+kEO/0RXDyjf7VVnkqUOpfAy74fw7ZiOHdHJvfHMFUIoXdQYdYiwjSmyNScxrINngXt5fp8MGqeUCMmLAEqHnQT+qTcIjIfN2Oj+2XrDxH5XsJQLWbZDReANOpvVU/xgoOD01K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X+ovJ8+P8Mr9ipxch355rWaSKh7uZBMFFJ4sn8reZVrpnMtzw4QVthZKkIJ6IoZ4wTWMi334wsNTgE2+hr2RsUq84=

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a secret and as such should not be here. You don't even need this much in your .travis.yml file

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually it's an encrypted secret that can only be interpreted by Travis CI

chai.use(chaiHttp);

const authToken = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MSwiZW1haWwiOiJrZW5uZWR5Lm53YW9yZ3VAYW5kZWxhLmNvbSIsInVzZXJuYW1lIjoiY29kZWpvY2tpZSIsImlhdCI6MTUwMDY2MTAwMywiZXhwIjoxNTAwOTIwMjAzfQ.8x36eu9hgEGkrWCYcH2ImA2z7N7OXtzOazVRM0GlaEA';
const authToken = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MSwiZW1haWwiOiJrZW5uZWR5Lm53YW9yZ3VAYW5kZWxhLmNvbSIsInVzZXJuYW1lIjoiY29kZWpvY2tpZSIsImlhdCI6MTUwMDcyODYxMCwiZXhwIjoxNTMyMjY0NjEwfQ.mn1ns_DZzP7vZKYR7_0EWm-8-HF_jk59jCQCmI0V6WY';

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All these tokens can be hidden in your .env file.

Copy link
Owner Author

@codejockie codejockie Jul 26, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've done that, it's on the master branch already. Good you noticed.

chai.use(chaiHttp);

const authToken = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MSwiZW1haWwiOiJrZW5uZWR5Lm53YW9yZ3VAYW5kZWxhLmNvbSIsInVzZXJuYW1lIjoiY29kZWpvY2tpZSIsImlhdCI6MTUwMDcyODYxMCwiZXhwIjoxNTMyMjY0NjEwfQ.mn1ns_DZzP7vZKYR7_0EWm-8-HF_jk59jCQCmI0V6WY';
const authToken = process.env.AUTH_TOKEN;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good!

@codejockie codejockie merged commit 53ad9ef into staging Aug 3, 2017
@codejockie codejockie deleted the chore/149448565/write-documentation branch May 18, 2018 11:31
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.

3 participants