Put the user's role and branch on GET /profile, upsert role_user and branch_user on POST, and drop their list endpoints.
Also accept flexible card-order form values, move mock seed under db/mock, and regenerate Swagger. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -193,6 +193,7 @@ definitions:
|
||||
cardorder.CreateCardOrderDTO:
|
||||
properties:
|
||||
bornAt:
|
||||
format: date
|
||||
type: string
|
||||
bornPlace:
|
||||
type: string
|
||||
@@ -223,6 +224,7 @@ definitions:
|
||||
passportFour:
|
||||
type: string
|
||||
passportGivenAt:
|
||||
format: date
|
||||
type: string
|
||||
passportGivenBy:
|
||||
type: string
|
||||
@@ -259,7 +261,6 @@ definitions:
|
||||
- customerName
|
||||
- customerSurname
|
||||
- passportFour
|
||||
- passportGivenAt
|
||||
- passportGivenBy
|
||||
- passportId
|
||||
- passportOne
|
||||
@@ -271,6 +272,7 @@ definitions:
|
||||
cardorder.UpdateCardOrderDTO:
|
||||
properties:
|
||||
bornAt:
|
||||
format: date
|
||||
type: string
|
||||
bornPlace:
|
||||
type: string
|
||||
@@ -301,6 +303,7 @@ definitions:
|
||||
passportFour:
|
||||
type: string
|
||||
passportGivenAt:
|
||||
format: date
|
||||
type: string
|
||||
passportGivenBy:
|
||||
type: string
|
||||
@@ -337,7 +340,6 @@ definitions:
|
||||
- customerName
|
||||
- customerSurname
|
||||
- passportFour
|
||||
- passportGivenAt
|
||||
- passportGivenBy
|
||||
- passportId
|
||||
- passportOne
|
||||
@@ -1390,7 +1392,8 @@ info:
|
||||
paths:
|
||||
/activity-logs:
|
||||
get:
|
||||
description: Returns a paginated audit trail of user actions (create/update/delete)
|
||||
description: Returns a paginated audit trail of user actions (create/update/delete).
|
||||
Each log includes the actor's username and role from role_user.
|
||||
parameters:
|
||||
- description: Filter by user ID
|
||||
in: query
|
||||
@@ -1468,38 +1471,11 @@ paths:
|
||||
tags:
|
||||
- activity-logs
|
||||
/branch-users:
|
||||
get:
|
||||
description: Returns the authenticated user's branch-user assignments with the
|
||||
related user and branch
|
||||
parameters:
|
||||
- description: Filter by branch name (en, ru, tm)
|
||||
in: query
|
||||
name: branch_name
|
||||
type: string
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
$ref: '#/definitions/appresult.AppSuccess'
|
||||
"401":
|
||||
description: Unauthorized
|
||||
schema:
|
||||
$ref: '#/definitions/appresult.AppError'
|
||||
"500":
|
||||
description: Internal Server Error
|
||||
schema:
|
||||
$ref: '#/definitions/appresult.AppError'
|
||||
security:
|
||||
- BearerAuth: []
|
||||
summary: List branch users
|
||||
tags:
|
||||
- branch-users
|
||||
post:
|
||||
consumes:
|
||||
- application/json
|
||||
description: Creates a branch-user assignment
|
||||
description: Creates a branch-user assignment, or updates the user's existing
|
||||
branch if one is already assigned
|
||||
parameters:
|
||||
- description: Branch-user payload
|
||||
in: body
|
||||
@@ -4012,7 +3988,7 @@ paths:
|
||||
- permission
|
||||
/profile:
|
||||
get:
|
||||
description: Returns the authenticated user's profile
|
||||
description: Returns the authenticated user's profile with role and branches
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
@@ -4490,38 +4466,11 @@ paths:
|
||||
tags:
|
||||
- auth
|
||||
/role-users:
|
||||
get:
|
||||
description: Returns the authenticated user's role-user assignments with the
|
||||
related user and role
|
||||
parameters:
|
||||
- description: Filter by role name
|
||||
in: query
|
||||
name: role_name
|
||||
type: string
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
$ref: '#/definitions/appresult.AppSuccess'
|
||||
"401":
|
||||
description: Unauthorized
|
||||
schema:
|
||||
$ref: '#/definitions/appresult.AppError'
|
||||
"500":
|
||||
description: Internal Server Error
|
||||
schema:
|
||||
$ref: '#/definitions/appresult.AppError'
|
||||
security:
|
||||
- BearerAuth: []
|
||||
summary: List role users
|
||||
tags:
|
||||
- role-users
|
||||
post:
|
||||
consumes:
|
||||
- application/json
|
||||
description: Creates a role-user assignment
|
||||
description: Creates a role-user assignment, or updates the user's existing
|
||||
role if one is already assigned
|
||||
parameters:
|
||||
- description: Role-user payload
|
||||
in: body
|
||||
@@ -5242,41 +5191,6 @@ paths:
|
||||
summary: Update visa/master payment order
|
||||
tags:
|
||||
- visa-master-payment-orders
|
||||
/visa-master-payment-orders/branches:
|
||||
get:
|
||||
description: Returns branches for the selected province for visa/master payment
|
||||
order forms
|
||||
parameters:
|
||||
- description: Province ID
|
||||
in: query
|
||||
name: province_id
|
||||
required: true
|
||||
type: integer
|
||||
- default: true
|
||||
description: Only active branches
|
||||
in: query
|
||||
name: active
|
||||
type: boolean
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
$ref: '#/definitions/appresult.AppSuccess'
|
||||
"400":
|
||||
description: Bad Request
|
||||
schema:
|
||||
$ref: '#/definitions/appresult.AppError'
|
||||
"500":
|
||||
description: Internal Server Error
|
||||
schema:
|
||||
$ref: '#/definitions/appresult.AppError'
|
||||
security:
|
||||
- BearerAuth: []
|
||||
summary: List branches by province
|
||||
tags:
|
||||
- visa-master-payment-orders
|
||||
securityDefinitions:
|
||||
BearerAuth:
|
||||
in: header
|
||||
|
||||
Reference in New Issue
Block a user