Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
AURA
dashboard
Commits
4d4d7f90
Commit
4d4d7f90
authored
Mar 23, 2018
by
Andrea Ida Malkah Klaura
Browse files
FIX: api trailing slashes and new fundingcategories
parent
d4219005
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/components/ShowManager.vue
View file @
4d4d7f90
...
...
@@ -113,9 +113,9 @@
<p>
<b-badge
variant=
"light"
>
Funding category (eg. for RTR):
</b-badge>
<!-- TODO: discuss: should this be visible to show owners or only to administrators? -->
<span
v-if=
"loaded.
rtr
category"
>
<span
v-if=
"current.
rtr
category.length === 0"
><small><i>
(none set)
</i></small></span>
<span
v-else
>
{{ current.
rtr
category[0].
rtr
category }}
</span>
<span
v-if=
"loaded.
funding
category"
>
<span
v-if=
"current.
funding
category.length === 0"
><small><i>
(none set)
</i></small></span>
<span
v-else
>
{{ current.
funding
category[0].
funding
category }}
</span>
<img
src=
"../assets/16x16/emblem-system.png"
alt=
"edit"
v-on:click=
"notYetImplemented"
/>
</span>
<span
v-else
><img
src=
"../assets/radio.gif"
height=
"24px"
alt=
"loading data"
/></span>
...
...
@@ -284,7 +284,7 @@ export default {
languages
:
false
,
topics
:
false
,
musicfocus
:
false
,
rtr
category
:
false
,
funding
category
:
false
,
type
:
false
},
current
:
{
...
...
@@ -293,7 +293,7 @@ export default {
languages
:
[],
topics
:
[],
musicfocus
:
[],
rtr
category
:
[],
funding
category
:
[],
type
:
[],
note
:
{}
}
...
...
@@ -342,7 +342,7 @@ export default {
this
.
loaded
.
hosts
=
false
this
.
loaded
.
languages
=
false
this
.
loaded
.
musicfocus
=
false
this
.
loaded
.
rtr
category
=
false
this
.
loaded
.
funding
category
=
false
// set the current show and its ID to whatever we want to switch to now
this
.
currentShow
=
index
this
.
currentShowID
=
this
.
shows
[
this
.
currentShow
].
id
...
...
@@ -451,7 +451,7 @@ export default {
this
.
loaded
.
categories
=
true
}
else
{
for
(
var
i
in
this
.
shows
[
this
.
currentShow
].
category
)
{
axios
.
get
(
process
.
env
.
API_STEERING
+
'
categories/
'
+
this
.
shows
[
this
.
currentShow
].
category
[
i
],
{
axios
.
get
(
process
.
env
.
API_STEERING
+
'
categories/
'
+
this
.
shows
[
this
.
currentShow
].
category
[
i
]
+
'
/
'
,
{
withCredentials
:
true
,
headers
:
{
'
Authorization
'
:
'
Bearer
'
+
this
.
$parent
.
user
.
access_token
}
}).
then
(
response
=>
{
...
...
@@ -491,7 +491,7 @@ export default {
this
.
loaded
.
languages
=
true
}
else
{
for
(
var
i
in
this
.
shows
[
this
.
currentShow
].
language
)
{
axios
.
get
(
process
.
env
.
API_STEERING
+
'
languages/
'
+
this
.
shows
[
this
.
currentShow
].
language
[
i
],
{
axios
.
get
(
process
.
env
.
API_STEERING
+
'
languages/
'
+
this
.
shows
[
this
.
currentShow
].
language
[
i
]
+
'
/
'
,
{
withCredentials
:
true
,
headers
:
{
'
Authorization
'
:
'
Bearer
'
+
this
.
$parent
.
user
.
access_token
}
}).
then
(
response
=>
{
...
...
@@ -511,7 +511,7 @@ export default {
this
.
loaded
.
topics
=
true
}
else
{
for
(
var
i
in
this
.
shows
[
this
.
currentShow
].
topic
)
{
axios
.
get
(
process
.
env
.
API_STEERING
+
'
topics/
'
+
this
.
shows
[
this
.
currentShow
].
topic
[
i
],
{
axios
.
get
(
process
.
env
.
API_STEERING
+
'
topics/
'
+
this
.
shows
[
this
.
currentShow
].
topic
[
i
]
+
'
/
'
,
{
withCredentials
:
true
,
headers
:
{
'
Authorization
'
:
'
Bearer
'
+
this
.
$parent
.
user
.
access_token
}
}).
then
(
response
=>
{
...
...
@@ -531,7 +531,7 @@ export default {
this
.
loaded
.
musicfocus
=
true
}
else
{
for
(
var
i
in
this
.
shows
[
this
.
currentShow
].
musicfocus
)
{
axios
.
get
(
process
.
env
.
API_STEERING
+
'
musicfocus/
'
+
this
.
shows
[
this
.
currentShow
].
musicfocus
[
i
],
{
axios
.
get
(
process
.
env
.
API_STEERING
+
'
musicfocus/
'
+
this
.
shows
[
this
.
currentShow
].
musicfocus
[
i
]
+
'
/
'
,
{
withCredentials
:
true
,
headers
:
{
'
Authorization
'
:
'
Bearer
'
+
this
.
$parent
.
user
.
access_token
}
}).
then
(
response
=>
{
...
...
@@ -545,22 +545,22 @@ export default {
if
(
!
loadingError
)
this
.
loaded
.
musicfocus
=
true
},
getRTRCategory
:
function
()
{
this
.
current
.
rtr
category
=
[]
this
.
current
.
funding
category
=
[]
var
loadingError
=
false
if
(
typeof
this
.
shows
[
this
.
currentShow
].
rtr
category
!==
'
number
'
)
{
this
.
loaded
.
rtr
category
=
true
if
(
typeof
this
.
shows
[
this
.
currentShow
].
funding
category
!==
'
number
'
)
{
this
.
loaded
.
funding
category
=
true
}
else
{
axios
.
get
(
process
.
env
.
API_STEERING
+
'
rtr
categories/
'
+
this
.
shows
[
this
.
currentShow
].
rtr
category
,
{
axios
.
get
(
process
.
env
.
API_STEERING
+
'
funding
categories/
'
+
this
.
shows
[
this
.
currentShow
].
funding
category
+
'
/
'
,
{
withCredentials
:
true
,
headers
:
{
'
Authorization
'
:
'
Bearer
'
+
this
.
$parent
.
user
.
access_token
}
}).
then
(
response
=>
{
this
.
current
.
rtr
category
.
push
(
response
.
data
)
this
.
current
.
funding
category
.
push
(
response
.
data
)
}).
catch
(
error
=>
{
loadingError
=
true
alert
(
'
There was an error fetching RTR category from the server:
'
+
error
)
})
}
if
(
!
loadingError
)
this
.
loaded
.
rtr
category
=
true
if
(
!
loadingError
)
this
.
loaded
.
funding
category
=
true
},
getType
:
function
()
{
this
.
current
.
type
=
[]
...
...
@@ -568,7 +568,7 @@ export default {
if
(
typeof
this
.
shows
[
this
.
currentShow
].
type
!==
'
number
'
)
{
this
.
loaded
.
type
=
true
}
else
{
axios
.
get
(
process
.
env
.
API_STEERING
+
'
types/
'
+
this
.
shows
[
this
.
currentShow
].
type
,
{
axios
.
get
(
process
.
env
.
API_STEERING
+
'
types/
'
+
this
.
shows
[
this
.
currentShow
].
type
+
'
/
'
,
{
withCredentials
:
true
,
headers
:
{
'
Authorization
'
:
'
Bearer
'
+
this
.
$parent
.
user
.
access_token
}
}).
then
(
response
=>
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment