File tree Expand file tree Collapse file tree 3 files changed +4
-4
lines changed Expand file tree Collapse file tree 3 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -280,7 +280,7 @@ class ThreadService extends BaseService {
280280 } ) . attach ( router ) ;
281281
282282 Endpoint ( {
283- route : '/delete/ :uid' ,
283+ route : '/:uid' ,
284284 methods : [ 'DELETE' ] ,
285285 mw : [ configurable_auth ( ) ] ,
286286 handler : async ( req , res ) => {
Original file line number Diff line number Diff line change @@ -8,12 +8,12 @@ export default class Perms {
88 async req_ ( route , body ) {
99 const resp = await fetch (
1010 this . APIOrigin + route , {
11- method : 'POST' ,
11+ method : body ? 'POST' : 'GET ',
1212 headers : {
1313 Authorization : `Bearer ${ this . authToken } ` ,
1414 'Content-Type' : 'application/json' ,
1515 } ,
16- body : JSON . stringify ( body ) ,
16+ ... ( body ? { body : JSON . stringify ( body ) } : { } ) ,
1717 }
1818 ) ;
1919 return await resp . json ( ) ;
Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ export default class Threads {
3939 }
4040
4141 async list ( uid , page , options ) {
42- await this . req_ ( 'POST' ,
42+ return await this . req_ ( 'POST' ,
4343 '/threads/list/' + encodeURIComponent ( uid ) + '/' + page ,
4444 options ?? { } ,
4545 ) ;
You can’t perform that action at this time.
0 commit comments