File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -214,8 +214,8 @@ class ThreadService extends BaseService {
214214 } ) . attach ( router ) ;
215215
216216 Endpoint ( {
217- route : '/edit' ,
218- methods : [ 'POST ' ] ,
217+ route : '/edit/:uid ' ,
218+ methods : [ 'PUT ' ] ,
219219 mw : [ configurable_auth ( ) ] ,
220220 handler : async ( req , res ) => {
221221 const text = req . body . text ;
@@ -235,7 +235,7 @@ class ThreadService extends BaseService {
235235 } ) ;
236236 }
237237
238- const uid = req . body . uid ;
238+ const uid = req . params . uid ;
239239
240240 if ( ! is_valid_uuid ( uid ) ) {
241241 throw APIError . create ( 'field_invalid' , null , {
@@ -280,11 +280,11 @@ class ThreadService extends BaseService {
280280 } ) . attach ( router ) ;
281281
282282 Endpoint ( {
283- route : '/delete' ,
284- methods : [ 'POST ' ] ,
283+ route : '/delete/:uid ' ,
284+ methods : [ 'DELETE ' ] ,
285285 mw : [ configurable_auth ( ) ] ,
286286 handler : async ( req , res ) => {
287- const uid = req . body . uid ;
287+ const uid = req . params . uid ;
288288
289289 if ( ! is_valid_uuid ( uid ) ) {
290290 throw APIError . create ( 'field_invalid' , null , {
You can’t perform that action at this time.
0 commit comments