mirror of
				https://github.com/superseriousbusiness/gotosocial.git
				synced 2025-10-31 00:12:25 -05:00 
			
		
		
		
	start refactoring return codes from fedi endpoints, remove some cruft
This commit is contained in:
		
					parent
					
						
							
								c6044d0142
							
						
					
				
			
			
				commit
				
					
						47051a26d6
					
				
			
		
					 28 changed files with 346 additions and 291 deletions
				
			
		|  | @ -91,7 +91,7 @@ import ( | |||
| //			description: not found | ||||
| func (m *Module) StatusRepliesGETHandler(c *gin.Context) { | ||||
| 	// usernames on our instance are always lowercase | ||||
| 	requestedUsername := strings.ToLower(c.Param(UsernameKey)) | ||||
| 	requestedUsername := strings.ToLower(c.Param(apiutil.UsernameKey)) | ||||
| 	if requestedUsername == "" { | ||||
| 		err := errors.New("no username specified in request") | ||||
| 		apiutil.ErrorHandler(c, gtserror.NewErrorBadRequest(err, err.Error()), m.processor.InstanceGetV1) | ||||
|  | @ -99,7 +99,7 @@ func (m *Module) StatusRepliesGETHandler(c *gin.Context) { | |||
| 	} | ||||
| 
 | ||||
| 	// status IDs on our instance are always uppercase | ||||
| 	requestedStatusID := strings.ToUpper(c.Param(StatusIDKey)) | ||||
| 	requestedStatusID := strings.ToUpper(c.Param(apiutil.IDKey)) | ||||
| 	if requestedStatusID == "" { | ||||
| 		err := errors.New("no status id specified in request") | ||||
| 		apiutil.ErrorHandler(c, gtserror.NewErrorBadRequest(err, err.Error()), m.processor.InstanceGetV1) | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue