improve the functions related to commenting on images

This commit is contained in:
landaiqing
2024-09-23 00:53:43 +08:00
parent 8d5d918a7d
commit 7aae53e533
32 changed files with 1004 additions and 86 deletions

View File

@@ -42,6 +42,33 @@ const docTemplate = `{
"responses": {}
}
},
"/api/auth/permission/assign": {
"post": {
"description": "给指定角色分配权限",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"权限管理"
],
"summary": "给指定角色分配权限",
"parameters": [
{
"description": "权限列表",
"name": "permissions",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/dto.AddPermissionToRoleRequestDto"
}
}
],
"responses": {}
}
},
"/api/auth/role/add_role_to_user": {
"post": {
"description": "给指定用户添加角色",
@@ -137,6 +164,22 @@ const docTemplate = `{
}
}
},
"/api/auth/user/logout": {
"post": {
"tags": [
"用户模块"
],
"summary": "退出登录",
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "string"
}
}
}
}
},
"/api/auth/user/query_by_phone": {
"get": {
"tags": [
@@ -405,6 +448,60 @@ const docTemplate = `{
}
}
},
"/api/comment/reply": {
"post": {
"description": "提交回复",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"评论"
],
"summary": "提交回复",
"parameters": [
{
"description": "回复评论请求",
"name": "reply_comment_request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/dto.ReplyCommentRequest"
}
}
],
"responses": {}
}
},
"/api/comment/submit": {
"post": {
"description": "提交评论",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"评论"
],
"summary": "提交评论",
"parameters": [
{
"description": "评论请求",
"name": "comment_request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/dto.CommentRequest"
}
}
],
"responses": {}
}
},
"/api/oauth/callback_notify": {
"post": {
"description": "微信回调",
@@ -762,16 +859,6 @@ const docTemplate = `{
"summary": "创建websocket服务",
"responses": {}
}
},
"/api/ws/socket": {
"get": {
"description": "创建websocket服务",
"tags": [
"websocket"
],
"summary": "创建websocket服务(gorilla)",
"responses": {}
}
}
},
"definitions": {
@@ -800,6 +887,20 @@ const docTemplate = `{
}
}
},
"dto.AddPermissionToRoleRequestDto": {
"type": "object",
"properties": {
"method": {
"type": "string"
},
"permission": {
"type": "string"
},
"role_key": {
"type": "string"
}
}
},
"dto.AddRoleToUserRequestDto": {
"type": "object",
"properties": {
@@ -811,6 +912,26 @@ const docTemplate = `{
}
}
},
"dto.CommentRequest": {
"type": "object",
"properties": {
"content": {
"type": "string"
},
"images": {
"type": "array",
"items": {
"type": "string"
}
},
"topic_id": {
"type": "string"
},
"user_id": {
"type": "string"
}
}
},
"dto.PhoneLoginRequest": {
"type": "object",
"properties": {
@@ -825,6 +946,32 @@ const docTemplate = `{
}
}
},
"dto.ReplyCommentRequest": {
"type": "object",
"properties": {
"content": {
"type": "string"
},
"images": {
"type": "array",
"items": {
"type": "string"
}
},
"reply_id": {
"type": "string"
},
"reply_user": {
"type": "string"
},
"topic_id": {
"type": "string"
},
"user_id": {
"type": "string"
}
}
},
"dto.ResetPasswordRequest": {
"type": "object",
"properties": {
@@ -913,7 +1060,6 @@ const docTemplate = `{
"type": "integer"
},
"update_by": {
"description": "更新人",
"type": "string"
},
"update_time": {

View File

@@ -31,6 +31,33 @@
"responses": {}
}
},
"/api/auth/permission/assign": {
"post": {
"description": "给指定角色分配权限",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"权限管理"
],
"summary": "给指定角色分配权限",
"parameters": [
{
"description": "权限列表",
"name": "permissions",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/dto.AddPermissionToRoleRequestDto"
}
}
],
"responses": {}
}
},
"/api/auth/role/add_role_to_user": {
"post": {
"description": "给指定用户添加角色",
@@ -126,6 +153,22 @@
}
}
},
"/api/auth/user/logout": {
"post": {
"tags": [
"用户模块"
],
"summary": "退出登录",
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "string"
}
}
}
}
},
"/api/auth/user/query_by_phone": {
"get": {
"tags": [
@@ -394,6 +437,60 @@
}
}
},
"/api/comment/reply": {
"post": {
"description": "提交回复",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"评论"
],
"summary": "提交回复",
"parameters": [
{
"description": "回复评论请求",
"name": "reply_comment_request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/dto.ReplyCommentRequest"
}
}
],
"responses": {}
}
},
"/api/comment/submit": {
"post": {
"description": "提交评论",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"评论"
],
"summary": "提交评论",
"parameters": [
{
"description": "评论请求",
"name": "comment_request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/dto.CommentRequest"
}
}
],
"responses": {}
}
},
"/api/oauth/callback_notify": {
"post": {
"description": "微信回调",
@@ -751,16 +848,6 @@
"summary": "创建websocket服务",
"responses": {}
}
},
"/api/ws/socket": {
"get": {
"description": "创建websocket服务",
"tags": [
"websocket"
],
"summary": "创建websocket服务(gorilla)",
"responses": {}
}
}
},
"definitions": {
@@ -789,6 +876,20 @@
}
}
},
"dto.AddPermissionToRoleRequestDto": {
"type": "object",
"properties": {
"method": {
"type": "string"
},
"permission": {
"type": "string"
},
"role_key": {
"type": "string"
}
}
},
"dto.AddRoleToUserRequestDto": {
"type": "object",
"properties": {
@@ -800,6 +901,26 @@
}
}
},
"dto.CommentRequest": {
"type": "object",
"properties": {
"content": {
"type": "string"
},
"images": {
"type": "array",
"items": {
"type": "string"
}
},
"topic_id": {
"type": "string"
},
"user_id": {
"type": "string"
}
}
},
"dto.PhoneLoginRequest": {
"type": "object",
"properties": {
@@ -814,6 +935,32 @@
}
}
},
"dto.ReplyCommentRequest": {
"type": "object",
"properties": {
"content": {
"type": "string"
},
"images": {
"type": "array",
"items": {
"type": "string"
}
},
"reply_id": {
"type": "string"
},
"reply_user": {
"type": "string"
},
"topic_id": {
"type": "string"
},
"user_id": {
"type": "string"
}
}
},
"dto.ResetPasswordRequest": {
"type": "object",
"properties": {
@@ -902,7 +1049,6 @@
"type": "integer"
},
"update_by": {
"description": "更新人",
"type": "string"
},
"update_time": {

View File

@@ -15,6 +15,15 @@ definitions:
$ref: '#/definitions/model.ScaAuthPermission'
type: array
type: object
dto.AddPermissionToRoleRequestDto:
properties:
method:
type: string
permission:
type: string
role_key:
type: string
type: object
dto.AddRoleToUserRequestDto:
properties:
role_key:
@@ -22,6 +31,19 @@ definitions:
uid:
type: string
type: object
dto.CommentRequest:
properties:
content:
type: string
images:
items:
type: string
type: array
topic_id:
type: string
user_id:
type: string
type: object
dto.PhoneLoginRequest:
properties:
auto_login:
@@ -31,6 +53,23 @@ definitions:
phone:
type: string
type: object
dto.ReplyCommentRequest:
properties:
content:
type: string
images:
items:
type: string
type: array
reply_id:
type: string
reply_user:
type: string
topic_id:
type: string
user_id:
type: string
type: object
dto.ResetPasswordRequest:
properties:
captcha:
@@ -94,7 +133,6 @@ definitions:
description: 类型 0 菜单 1 目录 2 按钮 -1其他
type: integer
update_by:
description: 更新人
type: string
update_time:
description: 更新时间
@@ -121,6 +159,24 @@ paths:
summary: 批量添加权限
tags:
- 权限管理
/api/auth/permission/assign:
post:
consumes:
- application/json
description: 给指定角色分配权限
parameters:
- description: 权限列表
in: body
name: permissions
required: true
schema:
$ref: '#/definitions/dto.AddPermissionToRoleRequestDto'
produces:
- application/json
responses: {}
summary: 给指定角色分配权限
tags:
- 权限管理
/api/auth/role/add_role_to_user:
post:
consumes:
@@ -183,6 +239,16 @@ paths:
summary: 删除用户
tags:
- 用户模块
/api/auth/user/logout:
post:
responses:
"200":
description: OK
schema:
type: string
summary: 退出登录
tags:
- 用户模块
/api/auth/user/query_by_phone:
get:
parameters:
@@ -358,6 +424,42 @@ paths:
summary: 生成基础文字验证码
tags:
- 基础文字验证码
/api/comment/reply:
post:
consumes:
- application/json
description: 提交回复
parameters:
- description: 回复评论请求
in: body
name: reply_comment_request
required: true
schema:
$ref: '#/definitions/dto.ReplyCommentRequest'
produces:
- application/json
responses: {}
summary: 提交回复
tags:
- 评论
/api/comment/submit:
post:
consumes:
- application/json
description: 提交评论
parameters:
- description: 评论请求
in: body
name: comment_request
required: true
schema:
$ref: '#/definitions/dto.CommentRequest'
produces:
- application/json
responses: {}
summary: 提交评论
tags:
- 评论
/api/oauth/callback_notify:
post:
description: 微信回调
@@ -595,11 +697,4 @@ paths:
summary: 创建websocket服务
tags:
- websocket
/api/ws/socket:
get:
description: 创建websocket服务
responses: {}
summary: 创建websocket服务(gorilla)
tags:
- websocket
swagger: "2.0"