mirror of
				https://github.com/superseriousbusiness/gotosocial.git
				synced 2025-10-31 14:22:25 -05:00 
			
		
		
		
	[feature] Application creation + management via API + settings panel (#3906)
* [feature] Application creation + management via API + settings panel * fix docs links * add errnorows test * use known application as shorter * add comment about side effects
This commit is contained in:
		
					parent
					
						
							
								d3c3d34aae
							
						
					
				
			
			
				commit
				
					
						d5847e2d2b
					
				
			
		
					 61 changed files with 3036 additions and 252 deletions
				
			
		|  | @ -21,11 +21,14 @@ import ( | |||
| 	"net/http" | ||||
| 
 | ||||
| 	"github.com/gin-gonic/gin" | ||||
| 	apiutil "github.com/superseriousbusiness/gotosocial/internal/api/util" | ||||
| 	"github.com/superseriousbusiness/gotosocial/internal/processing" | ||||
| ) | ||||
| 
 | ||||
| // BasePath is the base path for this api module, excluding the api prefix | ||||
| const BasePath = "/v1/apps" | ||||
| const ( | ||||
| 	BasePath       = "/v1/apps" | ||||
| 	BasePathWithID = BasePath + "/:" + apiutil.IDKey | ||||
| ) | ||||
| 
 | ||||
| type Module struct { | ||||
| 	processor *processing.Processor | ||||
|  | @ -39,4 +42,7 @@ func New(processor *processing.Processor) *Module { | |||
| 
 | ||||
| func (m *Module) Route(attachHandler func(method string, path string, f ...gin.HandlerFunc) gin.IRoutes) { | ||||
| 	attachHandler(http.MethodPost, BasePath, m.AppsPOSTHandler) | ||||
| 	attachHandler(http.MethodGet, BasePath, m.AppsGETHandler) | ||||
| 	attachHandler(http.MethodGet, BasePathWithID, m.AppGETHandler) | ||||
| 	attachHandler(http.MethodDelete, BasePathWithID, m.AppDELETEHandler) | ||||
| } | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue