File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -473,7 +473,7 @@ window.QPixel = {
473473
474474 followComments : async ( postId ) => {
475475 const resp = await QPixel . fetchJSON ( `/comments/post/${ postId } /follow` , { } , {
476- headers : { 'Accept' : 'application/json' } ,
476+ headers : { 'Accept' : 'application/json' }
477477 } ) ;
478478
479479 const data = await resp . json ( ) ;
@@ -492,6 +492,16 @@ window.QPixel = {
492492 return data ;
493493 } ,
494494
495+ unfollowComments : async ( postId ) => {
496+ const resp = await QPixel . fetchJSON ( `/comments/post/${ postId } /unfollow` , { } , {
497+ headers : { 'Accept' : 'application/json' }
498+ } ) ;
499+
500+ const data = await resp . json ( ) ;
501+
502+ return data ;
503+ } ,
504+
495505 lockThread : async ( id ) => {
496506 const resp = await QPixel . fetchJSON ( `/comments/thread/${ id } /restrict` , {
497507 type : 'lock'
Original file line number Diff line number Diff line change @@ -389,6 +389,13 @@ interface QPixel {
389389 */
390390 undeleteComment ?: ( id : string ) => Promise < QPixelResponseJSON >
391391
392+ /**
393+ * Attempts to stop following comments on a given post
394+ * @param postId id of the post to stop following comments on
395+ * @returns result of the operation
396+ */
397+ unfollowComments ?: ( postId : string ) => Promise < QPixelResponseJSON >
398+
392399 /**
393400 * Attempts to lock a comment thread
394401 * @param id id of the comment thread to lock
You can’t perform that action at this time.
0 commit comments