Skip to content

Commit 1cd1946

Browse files
committed
Merge branch 'feat/1.0.7/tag' into feat/1.0.7/short-id
2 parents 72636ab + 4759e87 commit 1cd1946

File tree

19 files changed

+311
-72
lines changed

19 files changed

+311
-72
lines changed

cmd/answer/wire_gen.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/docs.go

Lines changed: 65 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3932,6 +3932,38 @@ const docTemplate = `{
39323932
}
39333933
}
39343934
},
3935+
"post": {
3936+
"description": "add tag",
3937+
"consumes": [
3938+
"application/json"
3939+
],
3940+
"produces": [
3941+
"application/json"
3942+
],
3943+
"tags": [
3944+
"Tag"
3945+
],
3946+
"summary": "add tag",
3947+
"parameters": [
3948+
{
3949+
"description": "tag",
3950+
"name": "data",
3951+
"in": "body",
3952+
"required": true,
3953+
"schema": {
3954+
"$ref": "#/definitions/schema.AddTagReq"
3955+
}
3956+
}
3957+
],
3958+
"responses": {
3959+
"200": {
3960+
"description": "OK",
3961+
"schema": {
3962+
"$ref": "#/definitions/handler.RespBody"
3963+
}
3964+
}
3965+
}
3966+
},
39353967
"delete": {
39363968
"description": "delete tag",
39373969
"consumes": [
@@ -5545,6 +5577,31 @@ const docTemplate = `{
55455577
}
55465578
}
55475579
},
5580+
"schema.AddTagReq": {
5581+
"type": "object",
5582+
"required": [
5583+
"display_name",
5584+
"original_text",
5585+
"slug_name"
5586+
],
5587+
"properties": {
5588+
"display_name": {
5589+
"description": "display_name",
5590+
"type": "string",
5591+
"maxLength": 35
5592+
},
5593+
"original_text": {
5594+
"description": "original text",
5595+
"type": "string",
5596+
"maxLength": 65536
5597+
},
5598+
"slug_name": {
5599+
"description": "slug_name",
5600+
"type": "string",
5601+
"maxLength": 35
5602+
}
5603+
}
5604+
},
55485605
"schema.AddUserReq": {
55495606
"type": "object",
55505607
"required": [
@@ -5941,14 +5998,6 @@ const docTemplate = `{
59415998
"description": "user id",
59425999
"type": "string"
59436000
},
5944-
"ip_info": {
5945-
"description": "ip info",
5946-
"type": "string"
5947-
},
5948-
"is_admin": {
5949-
"description": "is admin",
5950-
"type": "boolean"
5951-
},
59526001
"last_login_date": {
59536002
"description": "last login date",
59546003
"type": "integer"
@@ -6437,10 +6486,6 @@ const docTemplate = `{
64376486
"description": "ip info",
64386487
"type": "string"
64396488
},
6440-
"is_admin": {
6441-
"description": "is admin",
6442-
"type": "boolean"
6443-
},
64446489
"language": {
64456490
"description": "language",
64466491
"type": "string"
@@ -6473,6 +6518,10 @@ const docTemplate = `{
64736518
"description": "rank",
64746519
"type": "integer"
64756520
},
6521+
"role_id": {
6522+
"description": "role id",
6523+
"type": "integer"
6524+
},
64766525
"status": {
64776526
"description": "user status",
64786527
"type": "string"
@@ -6537,10 +6586,6 @@ const docTemplate = `{
65376586
"description": "ip info",
65386587
"type": "string"
65396588
},
6540-
"is_admin": {
6541-
"description": "is admin",
6542-
"type": "boolean"
6543-
},
65446589
"language": {
65456590
"description": "language",
65466591
"type": "string"
@@ -6573,6 +6618,10 @@ const docTemplate = `{
65736618
"description": "rank",
65746619
"type": "integer"
65756620
},
6621+
"role_id": {
6622+
"description": "role id",
6623+
"type": "integer"
6624+
},
65766625
"status": {
65776626
"description": "user status",
65786627
"type": "string"

docs/swagger.json

Lines changed: 65 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3920,6 +3920,38 @@
39203920
}
39213921
}
39223922
},
3923+
"post": {
3924+
"description": "add tag",
3925+
"consumes": [
3926+
"application/json"
3927+
],
3928+
"produces": [
3929+
"application/json"
3930+
],
3931+
"tags": [
3932+
"Tag"
3933+
],
3934+
"summary": "add tag",
3935+
"parameters": [
3936+
{
3937+
"description": "tag",
3938+
"name": "data",
3939+
"in": "body",
3940+
"required": true,
3941+
"schema": {
3942+
"$ref": "#/definitions/schema.AddTagReq"
3943+
}
3944+
}
3945+
],
3946+
"responses": {
3947+
"200": {
3948+
"description": "OK",
3949+
"schema": {
3950+
"$ref": "#/definitions/handler.RespBody"
3951+
}
3952+
}
3953+
}
3954+
},
39233955
"delete": {
39243956
"description": "delete tag",
39253957
"consumes": [
@@ -5533,6 +5565,31 @@
55335565
}
55345566
}
55355567
},
5568+
"schema.AddTagReq": {
5569+
"type": "object",
5570+
"required": [
5571+
"display_name",
5572+
"original_text",
5573+
"slug_name"
5574+
],
5575+
"properties": {
5576+
"display_name": {
5577+
"description": "display_name",
5578+
"type": "string",
5579+
"maxLength": 35
5580+
},
5581+
"original_text": {
5582+
"description": "original text",
5583+
"type": "string",
5584+
"maxLength": 65536
5585+
},
5586+
"slug_name": {
5587+
"description": "slug_name",
5588+
"type": "string",
5589+
"maxLength": 35
5590+
}
5591+
}
5592+
},
55365593
"schema.AddUserReq": {
55375594
"type": "object",
55385595
"required": [
@@ -5929,14 +5986,6 @@
59295986
"description": "user id",
59305987
"type": "string"
59315988
},
5932-
"ip_info": {
5933-
"description": "ip info",
5934-
"type": "string"
5935-
},
5936-
"is_admin": {
5937-
"description": "is admin",
5938-
"type": "boolean"
5939-
},
59405989
"last_login_date": {
59415990
"description": "last login date",
59425991
"type": "integer"
@@ -6425,10 +6474,6 @@
64256474
"description": "ip info",
64266475
"type": "string"
64276476
},
6428-
"is_admin": {
6429-
"description": "is admin",
6430-
"type": "boolean"
6431-
},
64326477
"language": {
64336478
"description": "language",
64346479
"type": "string"
@@ -6461,6 +6506,10 @@
64616506
"description": "rank",
64626507
"type": "integer"
64636508
},
6509+
"role_id": {
6510+
"description": "role id",
6511+
"type": "integer"
6512+
},
64646513
"status": {
64656514
"description": "user status",
64666515
"type": "string"
@@ -6525,10 +6574,6 @@
65256574
"description": "ip info",
65266575
"type": "string"
65276576
},
6528-
"is_admin": {
6529-
"description": "is admin",
6530-
"type": "boolean"
6531-
},
65326577
"language": {
65336578
"description": "language",
65346579
"type": "string"
@@ -6561,6 +6606,10 @@
65616606
"description": "rank",
65626607
"type": "integer"
65636608
},
6609+
"role_id": {
6610+
"description": "role id",
6611+
"type": "integer"
6612+
},
65646613
"status": {
65656614
"description": "user status",
65666615
"type": "string"

docs/swagger.yaml

Lines changed: 46 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,25 @@ definitions:
174174
- object_id
175175
- report_type
176176
type: object
177+
schema.AddTagReq:
178+
properties:
179+
display_name:
180+
description: display_name
181+
maxLength: 35
182+
type: string
183+
original_text:
184+
description: original text
185+
maxLength: 65536
186+
type: string
187+
slug_name:
188+
description: slug_name
189+
maxLength: 35
190+
type: string
191+
required:
192+
- display_name
193+
- original_text
194+
- slug_name
195+
type: object
177196
schema.AddUserReq:
178197
properties:
179198
display_name:
@@ -457,12 +476,6 @@ definitions:
457476
id:
458477
description: user id
459478
type: string
460-
ip_info:
461-
description: ip info
462-
type: string
463-
is_admin:
464-
description: is admin
465-
type: boolean
466479
last_login_date:
467480
description: last login date
468481
type: integer
@@ -813,9 +826,6 @@ definitions:
813826
ip_info:
814827
description: ip info
815828
type: string
816-
is_admin:
817-
description: is admin
818-
type: boolean
819829
language:
820830
description: language
821831
type: string
@@ -840,6 +850,9 @@ definitions:
840850
rank:
841851
description: rank
842852
type: integer
853+
role_id:
854+
description: role id
855+
type: integer
843856
status:
844857
description: user status
845858
type: string
@@ -887,9 +900,6 @@ definitions:
887900
ip_info:
888901
description: ip info
889902
type: string
890-
is_admin:
891-
description: is admin
892-
type: boolean
893903
language:
894904
description: language
895905
type: string
@@ -914,6 +924,9 @@ definitions:
914924
rank:
915925
description: rank
916926
type: integer
927+
role_id:
928+
description: role id
929+
type: integer
917930
status:
918931
description: user status
919932
type: string
@@ -4297,6 +4310,27 @@ paths:
42974310
summary: get tag one
42984311
tags:
42994312
- Tag
4313+
post:
4314+
consumes:
4315+
- application/json
4316+
description: add tag
4317+
parameters:
4318+
- description: tag
4319+
in: body
4320+
name: data
4321+
required: true
4322+
schema:
4323+
$ref: '#/definitions/schema.AddTagReq'
4324+
produces:
4325+
- application/json
4326+
responses:
4327+
"200":
4328+
description: OK
4329+
schema:
4330+
$ref: '#/definitions/handler.RespBody'
4331+
summary: add tag
4332+
tags:
4333+
- Tag
43004334
put:
43014335
consumes:
43024336
- application/json

i18n/en_US.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,8 @@ backend:
106106
not_found:
107107
other: Report not found.
108108
tag:
109+
already_exist:
110+
other: Tag already exists.
109111
not_found:
110112
other: Tag not found.
111113
recommend_tag_not_found:

0 commit comments

Comments
 (0)