feat: PATCH /v1/user/me — профиль и смена пароля. Refs EventHub/EventHubBack#48
CI / test (push) Failing after 9m43s
CI / deploy-ift (push) Has been skipped
CI / e2e-ift (push) Has been skipped
CI / deploy-stage (push) Has been skipped
CI / e2e-stage (push) Has been skipped

This commit is contained in:
2026-07-19 23:26:34 +03:00
parent 5b638de450
commit 0934e2c413
6 changed files with 652 additions and 25 deletions
+152
View File
@@ -2638,6 +2638,158 @@
"description": "User not found"
}
}
},
"patch": {
"description": "Update current user profile (partial) or change password",
"tags": [
"Users"
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"language": {
"type": "string",
"enum": [
"ru",
"en"
]
},
"nickname": {
"type": "string",
"nullable": true
},
"timezone": {
"type": "string",
"nullable": true
},
"phone": {
"type": "string",
"nullable": true
},
"avatar_url": {
"type": "string",
"nullable": true
},
"preferences": {
"type": "object",
"nullable": true
},
"password": {
"type": "string",
"format": "password"
},
"current_password": {
"type": "string",
"format": "password"
}
}
}
}
}
},
"responses": {
"200": {
"description": "Updated profile",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"email": {
"type": "string",
"format": "email"
},
"role": {
"type": "string",
"enum": [
"user",
"bot"
]
},
"status": {
"type": "string",
"enum": [
"active",
"frozen",
"deleted"
]
},
"reason": {
"type": "string",
"nullable": true
},
"nickname": {
"type": "string",
"nullable": true
},
"avatar_url": {
"type": "string",
"nullable": true
},
"timezone": {
"type": "string",
"nullable": true
},
"language": {
"type": "string",
"enum": [
"ru",
"en"
],
"nullable": true
},
"social_links": {
"type": "array",
"items": {
"type": "string"
},
"nullable": true
},
"phone": {
"type": "string",
"nullable": true
},
"preferences": {
"type": "object",
"nullable": true
},
"last_login": {
"type": "string",
"format": "date-time"
},
"created_at": {
"type": "string",
"format": "date-time"
},
"updated_at": {
"type": "string",
"format": "date-time"
}
}
}
}
}
},
"400": {
"description": "Invalid body / unknown field"
},
"401": {
"description": "Unauthorized"
},
"403": {
"description": "Wrong current password or account not active"
},
"404": {
"description": "User not found"
}
}
}
},
"/v1/user/reviews": {