Align schema, API routes, and auth with updated admin domain model.
Rename users table fields and loan documents table, expand branch billing credentials, switch to /api/admin prefix, refactor auth endpoints, replace PATCH with PUT for status updates, remove file upload APIs, and regenerate Swagger with ordered tags. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -31,7 +31,7 @@ func (h *handler) Register(router *gin.RouterGroup) {
|
||||
group.GET("/:id", h.getByID)
|
||||
group.POST("", h.create)
|
||||
group.PUT("/:id", h.update)
|
||||
group.PATCH("/:id/status", h.updateStatus)
|
||||
group.PUT("/:id/status", h.updateStatus)
|
||||
group.DELETE("/:id", h.delete)
|
||||
}
|
||||
|
||||
@@ -192,7 +192,7 @@ func (h *handler) update(c *gin.Context) {
|
||||
// @Failure 400 {object} appresult.AppError
|
||||
// @Failure 404 {object} appresult.AppError
|
||||
// @Failure 500 {object} appresult.AppError
|
||||
// @Router /locations/{id}/status [patch]
|
||||
// @Router /locations/{id}/status [put]
|
||||
func (h *handler) updateStatus(c *gin.Context) {
|
||||
id, ok := parseID(c.Param("id"))
|
||||
if !ok {
|
||||
|
||||
Reference in New Issue
Block a user