-
Notifications
You must be signed in to change notification settings - Fork 0
Final sprint close for boba & vata #39
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
Open
anthonyvalera
wants to merge
28
commits into
master
Choose a base branch
from
dev
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
28 commits
Select commit
Hold shift + click to select a range
9a5d542
Added loopback (#11)
vancepope 7a02c10
BS-SBOX-2 (#12)
bens222 8965643
Removes comment (#16)
bens222 5a0bec5
AB-SBOX-6 (#17)
adbarc92 5c35ecd
Tmh sbox 9 (#18)
b047a63
Bs sbox 11 (#19)
bens222 c483b3b
Removes build and dist folders
Andyprolman eec313b
Ap sbox 7 (#22)
Andyprolman b8ffb2f
Ap login (#25)
Andyprolman 171534d
Ab sbox 6 (#24)
adbarc92 d88c1ed
fixes admin dashboard errors
Austin-Gray fc9faba
Merge pull request #27 from OriginCodeAcademy/ag-SBOX-10
Austin-Gray 0f65067
Ov sbox3 (#28)
anthonyvalera 6c56b74
Ab sbox 6 (#29)
adbarc92 7cf21c7
Adds default songs viewability and delete functionality
bens222 f409b50
Adds default songs viewability and delete functionality (#30)
bens222 ac076b9
Adds viewing capability of playlist on admin dashboard and delete fro…
bens222 ff749b8
Merge branch 'dev' into bs-SBOX-11
bens222 055f574
Adds delete song from queue functionality to admin dashboard
bens222 930cc9e
Tmh sbox 9 (#32)
befc3ca
Ap login (#34)
Andyprolman 847dc58
Vrp sbox 12 (#36)
Austin-Gray ae07fb9
Bs sbox 11b (#37)
bens222 9d24514
fixes add default song action and reducer (#38)
Andyprolman 778abc8
fixed updated playlist with spotify. added socket io broadcast in upd…
173fb08
Ab sbox 13 (#41)
adbarc92 e854260
Bpc sbox 14 (#42)
BladeSe7en 3d36950
Resolves Anthony's requests (#43)
bens222 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| # EditorConfig helps developers define and maintain consistent | ||
| # coding styles between different editors and IDEs | ||
| # http://editorconfig.org | ||
|
|
||
| root = true | ||
|
|
||
| [*] | ||
| indent_style = space | ||
| indent_size = 2 | ||
| end_of_line = lf | ||
| charset = utf-8 | ||
| trim_trailing_whitespace = true | ||
| insert_final_newline = true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,4 @@ | ||
| /client/ | ||
| /node_modules | ||
| /build | ||
| .vscode | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| { | ||
| "extends": "loopback" | ||
| } |
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -9,4 +9,7 @@ package-lock.json | |
| npm-debug.log* | ||
| yarn-debug.log* | ||
| yarn-error.log* | ||
| .env | ||
| .env | ||
| Mockup.sketch | ||
| dist | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| { | ||
| "generator-loopback": {} | ||
| } |
Empty file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| ## Client | ||
|
|
||
| This is the place for your application front-end files. |
File renamed without changes.
File renamed without changes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,137 @@ | ||
| 'use strict'; | ||
| const { getPlaylist, updatePlaylist } = require('../../server/utils/playlist'); | ||
| const { addToDefaultSongs } = require('../../server/utils/adminQueue'); | ||
| const { playCurrentSong, pauseCurrentSong } = require('../../server/utils/player'); | ||
|
|
||
| module.exports = function (Queue) { | ||
| Queue.getPlaylist = function (id, cb) { | ||
| getPlaylist(id) | ||
| .then((tracks) => cb(null, tracks)) | ||
| .catch(err => cb(err)); | ||
| } | ||
|
|
||
| Queue.remoteMethod('getPlaylist', { | ||
| description: 'Gets current playlist from Spotify', | ||
| accepts: { | ||
| arg: 'id', | ||
| type: 'string' | ||
| }, | ||
| http: { | ||
| path: '/getPlaylist', | ||
| verb: 'get' | ||
| }, | ||
| returns: { | ||
| arg: 'data', | ||
| type: 'array', | ||
| root: true | ||
| }, | ||
| }); | ||
|
|
||
| Queue.updatePlaylist = function (id, songID, cb) { | ||
| updatePlaylist(id, songID) | ||
| .then((queue) => { | ||
| Queue.replaceOrCreate(queue, cb); | ||
| }) | ||
| .catch(err => cb(err)); | ||
| } | ||
|
|
||
| Queue.remoteMethod('updatePlaylist', { | ||
| description: 'Adds new song to playlist and removes current playing song from playlist. Adds default songs if needed.', | ||
| accepts: [{ | ||
| arg: 'id', | ||
| type: 'string' | ||
| }, | ||
| { | ||
| arg: 'songID', | ||
| type: 'string', | ||
| required: false | ||
| }], | ||
| http: { | ||
| path: '/updatePlaylist', | ||
| verb: 'put' | ||
| }, | ||
| returns: { | ||
| arg: 'data', | ||
| type: 'array', | ||
| root: true | ||
| }, | ||
| }); | ||
|
|
||
| Queue.addToDefaultSongs = function (id, uri, cb) { | ||
| addToDefaultSongs(id, uri) | ||
| .then((queue) => { | ||
| Queue.replaceOrCreate(queue, cb); | ||
| }) | ||
| .catch(err => cb(err)); | ||
| }; | ||
|
|
||
| Queue.remoteMethod('addToDefaultSongs', { | ||
| description: 'Adds new song to default song array', | ||
| accepts: [ | ||
| { | ||
| arg: 'id', | ||
| type: 'string' | ||
| }, | ||
| { | ||
| arg: 'uri', | ||
| type: 'string' | ||
| }], | ||
| http: { | ||
| path: '/addToDefaultSongs', | ||
| verb: 'post' | ||
| }, | ||
| returns: { | ||
| arg: 'data', | ||
| type: 'array', | ||
| root: true | ||
| }, | ||
| }); | ||
|
|
||
| Queue.pauseCurrentSong = function (id, cb) { | ||
| pauseCurrentSong(id) | ||
| .then(response => cb(null, response)) | ||
| .catch(err => cb(err)); | ||
| }; | ||
|
|
||
| Queue.remoteMethod('pauseCurrentSong', { | ||
| description: 'Pauses currently playing song', | ||
| accepts: { | ||
| arg: 'id', | ||
| type: 'string' | ||
| }, | ||
| http: { | ||
| path: '/pauseCurrentSong', | ||
| verb: 'get' | ||
| }, | ||
| returns: { | ||
| arg: 'data', | ||
| type: 'array', | ||
| root: true | ||
| }, | ||
| }); | ||
|
|
||
| Queue.playCurrentSong = function (id, cb) { | ||
| playCurrentSong(id) | ||
| .then(response => cb(null, response)) | ||
| .catch(err => cb(err)); | ||
| }; | ||
|
|
||
| Queue.remoteMethod('playCurrentSong', { | ||
| description: 'Starts/resumes currently playing song', | ||
| accepts: { | ||
| arg: 'id', | ||
| type: 'string' | ||
| }, | ||
| http: { | ||
| path: '/playCurrentSong', | ||
| verb: 'get' | ||
| }, | ||
| returns: { | ||
| arg: 'data', | ||
| type: 'array', | ||
| root: true | ||
| }, | ||
| }); | ||
|
|
||
| }; | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,42 @@ | ||
| { | ||
| "name": "Queue", | ||
| "base": "PersistedModel", | ||
| "idInjection": true, | ||
| "options": { | ||
| "validateUpsert": true | ||
| }, | ||
| "properties": { | ||
| "defaultSongs": { | ||
| "type": [ | ||
| "object" | ||
| ], | ||
| "required": true | ||
| } | ||
| }, | ||
| "validations": [], | ||
| "relations": { | ||
| "default": { | ||
| "type": "referencesMany", | ||
| "model": "Song", | ||
| "foreignKey": "defaultSongs", | ||
| "options": { | ||
| "nestRemoting": true | ||
| } | ||
| }, | ||
| "songs": { | ||
| "type": "referencesMany", | ||
| "model": "Song", | ||
| "foreignKey": "", | ||
| "options": { | ||
| "nestRemoting": true | ||
| } | ||
| }, | ||
| "user": { | ||
| "type": "belongsTo", | ||
| "model": "user", | ||
| "foreignKey": "" | ||
| } | ||
| }, | ||
| "acls": [], | ||
| "methods": {} | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| 'use strict'; | ||
| const { getSong } = require('../../server/utils/song'); | ||
| const { getMoreMusicFromSpotify} = require('../../server/utils/getMoreFromSpotify'); | ||
|
|
||
| module.exports = function(Song) { | ||
| Song.getTrackData = function(songUri, userID, cb) { | ||
| getSong(songUri, userID) | ||
| .then(song => cb(null, song)) | ||
| .catch(err => cb(err)); | ||
| } | ||
|
|
||
| Song.remoteMethod('getTrackData', { | ||
| accepts: [{arg: 'songUri', type: 'string'},{arg: 'userID', type:'string'}], | ||
| returns: {arg: 'song', type: 'object'} | ||
| }); | ||
|
|
||
| Song.getMoreFromSpotify = function(userId, query, types, cb) { | ||
| getMoreMusicFromSpotify(userId, query, types) | ||
| .then((songs) => cb(null, songs)) | ||
| .catch(err => cb(err)); | ||
| }; | ||
|
|
||
| Song.remoteMethod('getMoreFromSpotify', { | ||
| description: 'Searchs for spotify songs', | ||
| accepts: [{arg: 'userId', type: 'string'}, {arg: 'query', type: 'string'}, {arg: 'types', type: 'array'}], | ||
| http: {path: '/getMoreFromSpotify', verb: 'get'}, | ||
| returns: {arg: 'data', type: 'array', root: true}, | ||
| }); | ||
| }; | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| { | ||
| "name": "Song", | ||
| "base": "PersistedModel", | ||
| "idInjection": true, | ||
| "options": { | ||
| "validateUpsert": true | ||
| }, | ||
| "properties": { | ||
| "name": { | ||
| "type": "string", | ||
| "required": true | ||
| }, | ||
| "duration": { | ||
| "type": "number", | ||
| "required": true | ||
| }, | ||
| "artist": { | ||
| "type": "string", | ||
| "required": true | ||
| }, | ||
| "uri": { | ||
| "type": "string", | ||
| "required": true | ||
| }, | ||
| "albumCover": { | ||
| "type": "string", | ||
| "required": true | ||
| }, | ||
| "spotifyId": { | ||
| "type": "string", | ||
| "required": true | ||
| } | ||
| }, | ||
| "validations": [], | ||
| "relations": {}, | ||
| "acls": [], | ||
| "methods": {} | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| 'use strict'; | ||
|
|
||
| module.exports = function(User) { | ||
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,63 @@ | ||
| { | ||
| "name": "user", | ||
| "plural": "users", | ||
| "base": "User", | ||
| "idInjection": true, | ||
| "options": { | ||
| "validateUpsert": true | ||
| }, | ||
| "properties": { | ||
| "firstName": { | ||
| "type": "string" | ||
| }, | ||
| "lastName": { | ||
| "type": "string" | ||
| }, | ||
| "email": { | ||
| "type": "string", | ||
| "required": true | ||
| }, | ||
| "username": { | ||
| "type": "string", | ||
| "required": true | ||
| }, | ||
| "password": { | ||
| "type": "string", | ||
| "required": true | ||
| }, | ||
| "accessToken": { | ||
| "type": "string", | ||
| "required": false | ||
| }, | ||
| "spotifyID": { | ||
| "type": "string", | ||
| "required": false | ||
| }, | ||
| "playlistID": { | ||
| "type": "string", | ||
| "required": false | ||
| }, | ||
| "spotifyRefreshToken": { | ||
| "type": "string", | ||
| "required": false | ||
| }, | ||
| "spotifyAccessToken": { | ||
| "type": "string", | ||
| "required": false | ||
| }, | ||
| "spotifyAccessToken": { | ||
| "type": "string", | ||
| "required": false | ||
| } | ||
| }, | ||
| "validations": [], | ||
| "relations": { | ||
| "queue": { | ||
| "type": "hasOne", | ||
| "model": "Queue", | ||
| "foreignKey": "" | ||
| } | ||
| }, | ||
| "acls": [], | ||
| "methods": {} | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.