Implemented authorization
This commit is contained in:
parent
a0c8fb19ca
commit
94608a0754
@ -1,4 +1,4 @@
|
|||||||
component ProfileHeader(viewUser *arn.User, user *arn.User, animeList *arn.AnimeList, threads []*arn.Thread)
|
component ProfileHeader(viewUser *arn.User, user *arn.User)
|
||||||
.profile
|
.profile
|
||||||
img.profile-cover(src=viewUser.CoverImageURL(), alt="Cover image")
|
img.profile-cover(src=viewUser.CoverImageURL(), alt="Cover image")
|
||||||
|
|
||||||
@ -45,7 +45,7 @@ component ProfileHeader(viewUser *arn.User, user *arn.User, animeList *arn.Anime
|
|||||||
span= arn.Capitalize(viewUser.Role)
|
span= arn.Capitalize(viewUser.Role)
|
||||||
|
|
||||||
component Profile(viewUser *arn.User, user *arn.User, animeList *arn.AnimeList, threads []*arn.Thread)
|
component Profile(viewUser *arn.User, user *arn.User, animeList *arn.AnimeList, threads []*arn.Thread)
|
||||||
ProfileHeader(viewUser, user, animeList, threads)
|
ProfileHeader(viewUser, user)
|
||||||
|
|
||||||
.profile-category
|
.profile-category
|
||||||
h3
|
h3
|
||||||
|
@ -10,7 +10,8 @@ export function addAnimeToCollection(arn: AnimeNotifier, button: HTMLElement) {
|
|||||||
|
|
||||||
fetch("/api/animelist/" + userId + "/add", {
|
fetch("/api/animelist/" + userId + "/add", {
|
||||||
method: "POST",
|
method: "POST",
|
||||||
body: animeId
|
body: animeId,
|
||||||
|
credentials: 'same-origin'
|
||||||
})
|
})
|
||||||
.then(response => response.text())
|
.then(response => response.text())
|
||||||
.then(body => {
|
.then(body => {
|
||||||
@ -33,7 +34,8 @@ export function removeAnimeFromCollection(arn: AnimeNotifier, button: HTMLElemen
|
|||||||
|
|
||||||
fetch("/api/animelist/" + userId + "/remove", {
|
fetch("/api/animelist/" + userId + "/remove", {
|
||||||
method: "POST",
|
method: "POST",
|
||||||
body: animeId
|
body: animeId,
|
||||||
|
credentials: 'same-origin'
|
||||||
})
|
})
|
||||||
.then(response => response.text())
|
.then(response => response.text())
|
||||||
.then(body => {
|
.then(body => {
|
||||||
|
Loading…
Reference in New Issue
Block a user