Skip to content
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

disregard this PR #36

Open
wants to merge 8 commits into
base: development
Choose a base branch
from
5 changes: 1 addition & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,4 @@ Changing lives, one podcast at a time.
5. *optional* ```createdb sharecast_test```
6. ```knex migrate:latest```
7. ```knex seed:run```
8. Review apiDoc documentation:
* Navigate to the root folder of ShareCast
* ```cd apidoc/```
* ```open index.html``` to open apiDoc in browser
8. Review apiDoc documentation:http://sharecast-g52.surge.sh/
5 changes: 4 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
'use strict';
require('dotenv').config();

if (process.env.NODE_ENV !== 'production') {
require('dotenv').config();
}

const helmet = require('helmet');
const express = require('express');
Expand Down
8 changes: 8 additions & 0 deletions knexfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,13 @@ module.exports = {
seeds: {
directory: `${__dirname}/seeds/development`
}
},

production: {
client: 'pg',
connection: process.env.DATABASE_URL,
seeds: {
directory: `${__dirname}/seeds/development`
}
}
};
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,11 @@
"test": "test"
},
"scripts": {
"heroku-postbuild": "knex migrate:latest",
"knex": "knex",
"test": "mocha",
"testnyc": "nyc mocha"
"testnyc": "nyc mocha",
"start": "node index.js"
},
"repository": {
"type": "git",
Expand Down
8 changes: 4 additions & 4 deletions routes/favorites.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ const router = express.Router();
* @apiSuccess {Number} searchResults.podcastId Podcast ID.
* @apiSuccessExample {json} Success-Response:
* HTTP/1.1 200 OK
* {
* [{
id: 1,
artistId: 1134742667,
collectionId: 948976028,
Expand Down Expand Up @@ -81,7 +81,7 @@ const router = express.Router();
userId: 1,
userIdShared: 2,
podcastId: 2
}
}]
*
* @apiErrorExample {json} Unauthorized user
* HTTP/1.1 401 "Unauthorized"
Expand Down Expand Up @@ -138,7 +138,7 @@ router.get('/', checkForToken, verifyUser, (req, res, next) => {
* @apiSuccess {String[]} searchResults.genres Genres for the podcast.
* @apiSuccessExample {json} Success-Response:
* HTTP/1.1 200 OK
* {
* [{
id: 1,
userId: 1,
userIdShared: 2,
Expand All @@ -159,7 +159,7 @@ router.get('/', checkForToken, verifyUser, (req, res, next) => {
artworkUrl600: 'http://is1.mzstatic.com/image/thumb/Music62/v4/ce/22/03/ce220318-10da-b927-16fb-ab5479045e1b/source/600x600bb.jpg',
genreIds: [ '1305', '26', '1301', '1304' ],
genres: [ 'Kids & Family', 'Podcasts', 'Arts', 'Education' ]
}
}]
*
* @apiErrorExample {json} Unauthorized user
* HTTP/1.1 401 "Unauthorized"
Expand Down
16 changes: 0 additions & 16 deletions routes/login.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,20 +88,6 @@ router.post('/' , verifyLoginDetails, (req, res, next) => {

});


// route.get('/', verifyLoginDetails, (req, res, next) => {
// // NOTE should GET requests even hit this route?
//
// //if so then we'll just want to pass them either to their auth landing page or??
// })

//this route is for new users only


// function checkIfUserIsRegistered(req, res, next) {
//
// }

function verifyLoginDetails(req, res, next) {

let email = req.body.email;
Expand All @@ -123,6 +109,4 @@ function verifyLoginDetails(req, res, next) {
}
};



module.exports = router;
4 changes: 2 additions & 2 deletions routes/search.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ const ITUNES_PODCAST_LOOKUP_BASE_URL = "https://itunes.apple.com/lookup?id="
* @apiSuccess {String} searchResults.trackViewUrl URL for podcast on iTunes.
* @apiSuccessExample {json} Success-Response:
* HTTP/1.1 200 OK
* {
* [{
"artistName": "Maria Calanchini",
"artworkUrl60": "http://is1.mzstatic.com/image/thumb/Music62/v4/9e/d5/9d/9ed59d33-a591-26cd-d740-e8f906a08a15/source/60x60bb.jpg",
"artworkUrl600": "http://is1.mzstatic.com/image/thumb/Music62/v4/9e/d5/9d/9ed59d33-a591-26cd-d740-e8f906a08a15/source/600x600bb.jpg",
Expand Down Expand Up @@ -132,7 +132,7 @@ const ITUNES_PODCAST_LOOKUP_BASE_URL = "https://itunes.apple.com/lookup?id="
],
"trackId": 733259146,
"trackViewUrl": "https://itunes.apple.com/us/podcast/goop-directory-the-by-burgess-frank-gelett/id733259146?mt=2&uo=4"
}
}]
*
* @apiErrorExample {json} List error
* HTTP/1.1 500 Internal Server Error
Expand Down
Empty file removed routes/shared.js
Empty file.