Move GET pinned/{id} to POST item/{id}/pin

This commit is contained in:
Hypolite Petovan 2021-01-30 18:42:23 -05:00
parent b3b2bc96ba
commit 188f7b0eb0
3 changed files with 33 additions and 17 deletions

View file

@ -704,9 +704,9 @@ function dostar(ident) {
function doPin(ident) {
ident = ident.toString();
$('#like-rotator-' + ident).show();
$.get('pinned/' + ident)
$.post('item/' + ident + '/pin')
.then(function(data) {
if (data.match(/1/)) {
if (data.state === 1) {
$('#pinned-' + ident)
.addClass('pinned')
.removeClass('unpinned');