This commit is contained in:
2020-09-08 15:08:59 +08:00
parent d6ffd43c5e
commit 77ea7c3b01

View File

@@ -196,7 +196,7 @@ def get_comment():
return {
'code': 0,
'attention': check_attention(hash_name(u.name), pid),
'attention': check_attention(u.name, pid),
'data': data
}
@@ -248,6 +248,8 @@ def attention():
at = Attention(name_hash=hash_name(u.name), pid=pid, disabled=True)
db.session.add(at)
print(at.disabled, s=='0')
if(at.disabled != (s == '0')):
at.disabled = (s == '0')
post.likenum += 1 - 2 * int(s == '0');