Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
spotifier
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Kovács Dániel
spotifier
Commits
ba93ed0a
Commit
ba93ed0a
authored
Dec 6, 2019
by
Daniel Kovacs
Browse files
Options
Downloads
Patches
Plain Diff
Fix
parent
8c3cfb69
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
frontend/src/actions/playlistActions.js
+8
-8
8 additions, 8 deletions
frontend/src/actions/playlistActions.js
server.js
+1
-1
1 addition, 1 deletion
server.js
with
9 additions
and
9 deletions
frontend/src/actions/playlistActions.js
+
8
−
8
View file @
ba93ed0a
...
@@ -49,7 +49,7 @@ export const getGenres = () => dispatch => {
...
@@ -49,7 +49,7 @@ export const getGenres = () => dispatch => {
export
const
getUnsavedPlaylists
=
(
owner
)
=>
dispatch
=>
{
export
const
getUnsavedPlaylists
=
(
owner
)
=>
dispatch
=>
{
dispatch
(
setUnsavedPlaylistLoading
());
dispatch
(
setUnsavedPlaylistLoading
());
console
.
log
(
owner
);
console
.
log
(
owner
);
axios
.
get
(
`
https://thespotifierapp.herokuapp.com/api
/parties/
${
owner
}
/0`
)
axios
.
get
(
`/parties/
${
owner
}
/0`
)
.
then
(
res
=>
.
then
(
res
=>
dispatch
({
dispatch
({
type
:
GET_UNSAVEDPLAYLISTS
,
type
:
GET_UNSAVEDPLAYLISTS
,
...
@@ -65,7 +65,7 @@ export const getUnsavedPlaylists = (owner) => dispatch => {
...
@@ -65,7 +65,7 @@ export const getUnsavedPlaylists = (owner) => dispatch => {
export
const
getPartyDetails
=
(
partyId
)
=>
dispatch
=>
{
export
const
getPartyDetails
=
(
partyId
)
=>
dispatch
=>
{
dispatch
(
setPartyDetailsLoading
());
dispatch
(
setPartyDetailsLoading
());
axios
.
get
(
`
https://thespotifierapp.herokuapp.com/api
/partydetails/
${
partyId
}
`
)
axios
.
get
(
`/partydetails/
${
partyId
}
`
)
.
then
(
res
=>
.
then
(
res
=>
dispatch
({
dispatch
({
type
:
GET_PARTYDETAILS
,
type
:
GET_PARTYDETAILS
,
...
@@ -95,7 +95,7 @@ export const addPlaylist = (plData,history,owner) => dispatch =>{
...
@@ -95,7 +95,7 @@ export const addPlaylist = (plData,history,owner) => dispatch =>{
}
}
axios
axios
.
post
(
`
https://thespotifierapp.herokuapp.com/api
/addparty/
${
owner
}
`
,
updatedplData
)
.
post
(
`/addparty/
${
owner
}
`
,
updatedplData
)
.
then
(
res
=>
{
.
then
(
res
=>
{
dispatch
({
dispatch
({
type
:
ADDED_PLAYLIST
,
type
:
ADDED_PLAYLIST
,
...
@@ -112,10 +112,10 @@ export const addPlaylist = (plData,history,owner) => dispatch =>{
...
@@ -112,10 +112,10 @@ export const addPlaylist = (plData,history,owner) => dispatch =>{
export
const
savePlaylist
=
(
body
,
history
)
=>
dispatch
=>
{
export
const
savePlaylist
=
(
body
,
history
)
=>
dispatch
=>
{
axios
axios
.
post
(
`
https://thespotifierapp.herokuapp.com/api
/saveplaylist/
${
body
.
id
}
`
,
body
)
.
post
(
`/saveplaylist/
${
body
.
id
}
`
,
body
)
.
then
(
res
=>
{
.
then
(
res
=>
{
history
.
push
(
'
/dashboard
'
)
history
.
push
(
'
/dashboard
'
)
window
.
location
.
href
=
"
https://thespotifierapp.herokuapp.com
/dashboard
"
window
.
location
.
href
=
"
/dashboard
"
dispatch
({
dispatch
({
type
:
ADDED_PLAYLIST
,
type
:
ADDED_PLAYLIST
,
payload
:
{}
payload
:
{}
...
@@ -131,7 +131,7 @@ export const savePlaylist = (body,history) => dispatch => {
...
@@ -131,7 +131,7 @@ export const savePlaylist = (body,history) => dispatch => {
export
const
getPlaylist
=
(
id
,
history
)
=>
dispatch
=>
export
const
getPlaylist
=
(
id
,
history
)
=>
dispatch
=>
{
{
axios
axios
.
get
(
`
https://thespotifierapp.herokuapp.com
/parties/danyy27/1
${
id
}
`
)
.
get
(
`/parties/danyy27/1
${
id
}
`
)
.
then
(
res
=>
{
.
then
(
res
=>
{
history
.
push
(
'
/dashboard
'
)
history
.
push
(
'
/dashboard
'
)
})
})
...
@@ -154,10 +154,10 @@ export const editPlaylist = (id,plData,history) => dispatch =>
...
@@ -154,10 +154,10 @@ export const editPlaylist = (id,plData,history) => dispatch =>
export
const
deletePlaylist
=
(
id
,
history
)
=>
dispatch
=>
export
const
deletePlaylist
=
(
id
,
history
)
=>
dispatch
=>
{
{
axios
axios
.
delete
(
`
https://thespotifierapp.herokuapp.com/api
/deleteparty/
${
id
}
`
)
.
delete
(
`/deleteparty/
${
id
}
`
)
.
then
(
res
=>
{
.
then
(
res
=>
{
history
.
push
(
'
/dashboard
'
);
history
.
push
(
'
/dashboard
'
);
window
.
location
.
href
=
"
https://thespotifierapp.herokuapp.com
/dashboard
"
window
.
location
.
href
=
"
/dashboard
"
}
}
)
)
.
catch
(
err
=>
{
dispatch
({
type
:
GET_ERRORS
,
payload
:
err
.
response
.
data
})})
.
catch
(
err
=>
{
dispatch
({
type
:
GET_ERRORS
,
payload
:
err
.
response
.
data
})})
...
...
This diff is collapsed.
Click to expand it.
server.js
+
1
−
1
View file @
ba93ed0a
...
@@ -23,7 +23,7 @@ app.use(cors({origin: '*'}));
...
@@ -23,7 +23,7 @@ app.use(cors({origin: '*'}));
const
redirect_uri
=
const
redirect_uri
=
process
.
env
.
REDIRECT_URI
||
process
.
env
.
REDIRECT_URI
||
'
http
s
://thespotifierapp.herokuapp.com/callback
'
;
'
http://thespotifierapp.herokuapp.com/callback
'
;
let
db
=
new
sqlite3
.
Database
(
'
./spotifier.db
'
,
(
err
)
=>
{
let
db
=
new
sqlite3
.
Database
(
'
./spotifier.db
'
,
(
err
)
=>
{
if
(
err
)
{
if
(
err
)
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment