Skip to content
Snippets Groups Projects
Commit 66fbf4d5 authored by Inga Kirschnick's avatar Inga Kirschnick
Browse files

update corpus public page

parent 4d227415
No related branches found
No related tags found
No related merge requests found
...@@ -67,9 +67,7 @@ ...@@ -67,9 +67,7 @@
followingUserList.add({{ following_users|tojson }}); #} followingUserList.add({{ following_users|tojson }}); #}
corpusFollowingRequest.addEventListener('click', () => { corpusFollowingRequest.addEventListener('click', () => {
corpusFollowingRequest.innerHTML = '<i class="material-icons left">add</i>Unfollow Corpus'; if ({{ current_user.is_following_corpus(corpus)|tojson }}) {
if ("{{ current_user.is_following_corpus(corpus) }}" === "False") {
corpusFollowingRequest.lastChild.textContent = 'Unfollow Corpus';
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
fetch(`/corpora/{{ corpus.hashid }}/unfollow`, {method: 'POST', headers: {Accept: 'application/json'}}) fetch(`/corpora/{{ corpus.hashid }}/unfollow`, {method: 'POST', headers: {Accept: 'application/json'}})
.then( .then(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment