@@ -1211,21 +1211,21 @@ const docTemplate = `{
12111211 }
12121212 }
12131213 },
1214- "/answer/admin/api/siteinfo/legal ": {
1214+ "/answer/admin/api/siteinfo/login ": {
12151215 "get": {
12161216 "security": [
12171217 {
12181218 "ApiKeyAuth": []
12191219 }
12201220 ],
1221- "description": "Set the legal information for the site ",
1221+ "description": "get site info login config ",
12221222 "produces": [
12231223 "application/json"
12241224 ],
12251225 "tags": [
12261226 "admin"
12271227 ],
1228- "summary": "Set the legal information for the site ",
1228+ "summary": "get site info login config ",
12291229 "responses": {
12301230 "200": {
12311231 "description": "OK",
@@ -1238,7 +1238,7 @@ const docTemplate = `{
12381238 "type": "object",
12391239 "properties": {
12401240 "data": {
1241- "$ref": "#/definitions/schema.SiteLegalResp "
1241+ "$ref": "#/definitions/schema.SiteLoginResp "
12421242 }
12431243 }
12441244 }
@@ -1253,22 +1253,22 @@ const docTemplate = `{
12531253 "ApiKeyAuth": []
12541254 }
12551255 ],
1256- "description": "update site legal info ",
1256+ "description": "update site login ",
12571257 "produces": [
12581258 "application/json"
12591259 ],
12601260 "tags": [
12611261 "admin"
12621262 ],
1263- "summary": "update site legal info ",
1263+ "summary": "update site login ",
12641264 "parameters": [
12651265 {
1266- "description": "write info",
1266+ "description": "login info",
12671267 "name": "data",
12681268 "in": "body",
12691269 "required": true,
12701270 "schema": {
1271- "$ref": "#/definitions/schema.SiteLegalReq "
1271+ "$ref": "#/definitions/schema.SiteLoginReq "
12721272 }
12731273 }
12741274 ],
@@ -1282,21 +1282,21 @@ const docTemplate = `{
12821282 }
12831283 }
12841284 },
1285- "/answer/admin/api/siteinfo/login ": {
1285+ "/answer/admin/api/siteinfo/polices ": {
12861286 "get": {
12871287 "security": [
12881288 {
12891289 "ApiKeyAuth": []
12901290 }
12911291 ],
1292- "description": "get site info login config ",
1292+ "description": "Get the policies information for the site ",
12931293 "produces": [
12941294 "application/json"
12951295 ],
12961296 "tags": [
12971297 "admin"
12981298 ],
1299- "summary": "get site info login config ",
1299+ "summary": "Get the policies information for the site ",
13001300 "responses": {
13011301 "200": {
13021302 "description": "OK",
@@ -1309,7 +1309,7 @@ const docTemplate = `{
13091309 "type": "object",
13101310 "properties": {
13111311 "data": {
1312- "$ref": "#/definitions/schema.SiteLoginResp "
1312+ "$ref": "#/definitions/schema.SitePoliciesResp "
13131313 }
13141314 }
13151315 }
@@ -1324,22 +1324,22 @@ const docTemplate = `{
13241324 "ApiKeyAuth": []
13251325 }
13261326 ],
1327- "description": "update site login ",
1327+ "description": "update site policies configuration ",
13281328 "produces": [
13291329 "application/json"
13301330 ],
13311331 "tags": [
13321332 "admin"
13331333 ],
1334- "summary": "update site login ",
1334+ "summary": "update site policies configuration ",
13351335 "parameters": [
13361336 {
1337- "description": "login info",
1337+ "description": "write info",
13381338 "name": "data",
13391339 "in": "body",
13401340 "required": true,
13411341 "schema": {
1342- "$ref": "#/definitions/schema.SiteLoginReq "
1342+ "$ref": "#/definitions/schema.SitePoliciesReq "
13431343 }
13441344 }
13451345 ],
@@ -1424,6 +1424,77 @@ const docTemplate = `{
14241424 }
14251425 }
14261426 },
1427+ "/answer/admin/api/siteinfo/security": {
1428+ "get": {
1429+ "security": [
1430+ {
1431+ "ApiKeyAuth": []
1432+ }
1433+ ],
1434+ "description": "Get the security information for the site",
1435+ "produces": [
1436+ "application/json"
1437+ ],
1438+ "tags": [
1439+ "admin"
1440+ ],
1441+ "summary": "Get the security information for the site",
1442+ "responses": {
1443+ "200": {
1444+ "description": "OK",
1445+ "schema": {
1446+ "allOf": [
1447+ {
1448+ "$ref": "#/definitions/handler.RespBody"
1449+ },
1450+ {
1451+ "type": "object",
1452+ "properties": {
1453+ "data": {
1454+ "$ref": "#/definitions/schema.SiteSecurityResp"
1455+ }
1456+ }
1457+ }
1458+ ]
1459+ }
1460+ }
1461+ }
1462+ },
1463+ "put": {
1464+ "security": [
1465+ {
1466+ "ApiKeyAuth": []
1467+ }
1468+ ],
1469+ "description": "update site security configuration",
1470+ "produces": [
1471+ "application/json"
1472+ ],
1473+ "tags": [
1474+ "admin"
1475+ ],
1476+ "summary": "update site security configuration",
1477+ "parameters": [
1478+ {
1479+ "description": "write info",
1480+ "name": "data",
1481+ "in": "body",
1482+ "required": true,
1483+ "schema": {
1484+ "$ref": "#/definitions/schema.SiteSecurityReq"
1485+ }
1486+ }
1487+ ],
1488+ "responses": {
1489+ "200": {
1490+ "description": "OK",
1491+ "schema": {
1492+ "$ref": "#/definitions/handler.RespBody"
1493+ }
1494+ }
1495+ }
1496+ }
1497+ },
14271498 "/answer/admin/api/siteinfo/seo": {
14281499 "get": {
14291500 "security": [
@@ -10843,9 +10914,6 @@ const docTemplate = `{
1084310914 "site_url"
1084410915 ],
1084510916 "properties": {
10846- "check_update": {
10847- "type": "boolean"
10848- },
1084910917 "contact_email": {
1085010918 "type": "string",
1085110919 "maxLength": 512
@@ -10876,9 +10944,6 @@ const docTemplate = `{
1087610944 "site_url"
1087710945 ],
1087810946 "properties": {
10879- "check_update": {
10880- "type": "boolean"
10881- },
1088210947 "contact_email": {
1088310948 "type": "string",
1088410949 "maxLength": 512
@@ -10917,7 +10982,12 @@ const docTemplate = `{
1091710982 "$ref": "#/definitions/schema.SiteInterfaceSettingsResp"
1091810983 },
1091910984 "login": {
10920- "$ref": "#/definitions/schema.SiteLoginResp"
10985+ "description": "todo",
10986+ "allOf": [
10987+ {
10988+ "$ref": "#/definitions/schema.SiteLoginResp"
10989+ }
10990+ ]
1092110991 },
1092210992 "revision": {
1092310993 "type": "string"
@@ -10996,60 +11066,6 @@ const docTemplate = `{
1099611066 }
1099711067 }
1099811068 },
10999- "schema.SiteLegalReq": {
11000- "type": "object",
11001- "required": [
11002- "external_content_display"
11003- ],
11004- "properties": {
11005- "external_content_display": {
11006- "type": "string",
11007- "enum": [
11008- "always_display",
11009- "ask_before_display"
11010- ]
11011- },
11012- "privacy_policy_original_text": {
11013- "type": "string"
11014- },
11015- "privacy_policy_parsed_text": {
11016- "type": "string"
11017- },
11018- "terms_of_service_original_text": {
11019- "type": "string"
11020- },
11021- "terms_of_service_parsed_text": {
11022- "type": "string"
11023- }
11024- }
11025- },
11026- "schema.SiteLegalResp": {
11027- "type": "object",
11028- "required": [
11029- "external_content_display"
11030- ],
11031- "properties": {
11032- "external_content_display": {
11033- "type": "string",
11034- "enum": [
11035- "always_display",
11036- "ask_before_display"
11037- ]
11038- },
11039- "privacy_policy_original_text": {
11040- "type": "string"
11041- },
11042- "privacy_policy_parsed_text": {
11043- "type": "string"
11044- },
11045- "terms_of_service_original_text": {
11046- "type": "string"
11047- },
11048- "terms_of_service_parsed_text": {
11049- "type": "string"
11050- }
11051- }
11052- },
1105311069 "schema.SiteLegalSimpleResp": {
1105411070 "type": "object",
1105511071 "required": [
@@ -11082,9 +11098,6 @@ const docTemplate = `{
1108211098 },
1108311099 "allow_password_login": {
1108411100 "type": "boolean"
11085- },
11086- "login_required": {
11087- "type": "boolean"
1108811101 }
1108911102 }
1109011103 },
@@ -11105,9 +11118,40 @@ const docTemplate = `{
1110511118 },
1110611119 "allow_password_login": {
1110711120 "type": "boolean"
11121+ }
11122+ }
11123+ },
11124+ "schema.SitePoliciesReq": {
11125+ "type": "object",
11126+ "properties": {
11127+ "privacy_policy_original_text": {
11128+ "type": "string"
1110811129 },
11109- "login_required": {
11110- "type": "boolean"
11130+ "privacy_policy_parsed_text": {
11131+ "type": "string"
11132+ },
11133+ "terms_of_service_original_text": {
11134+ "type": "string"
11135+ },
11136+ "terms_of_service_parsed_text": {
11137+ "type": "string"
11138+ }
11139+ }
11140+ },
11141+ "schema.SitePoliciesResp": {
11142+ "type": "object",
11143+ "properties": {
11144+ "privacy_policy_original_text": {
11145+ "type": "string"
11146+ },
11147+ "privacy_policy_parsed_text": {
11148+ "type": "string"
11149+ },
11150+ "terms_of_service_original_text": {
11151+ "type": "string"
11152+ },
11153+ "terms_of_service_parsed_text": {
11154+ "type": "string"
1111111155 }
1111211156 }
1111311157 },
@@ -11137,6 +11181,48 @@ const docTemplate = `{
1113711181 }
1113811182 }
1113911183 },
11184+ "schema.SiteSecurityReq": {
11185+ "type": "object",
11186+ "required": [
11187+ "external_content_display"
11188+ ],
11189+ "properties": {
11190+ "check_update": {
11191+ "type": "boolean"
11192+ },
11193+ "external_content_display": {
11194+ "type": "string",
11195+ "enum": [
11196+ "always_display",
11197+ "ask_before_display"
11198+ ]
11199+ },
11200+ "login_required": {
11201+ "type": "boolean"
11202+ }
11203+ }
11204+ },
11205+ "schema.SiteSecurityResp": {
11206+ "type": "object",
11207+ "required": [
11208+ "external_content_display"
11209+ ],
11210+ "properties": {
11211+ "check_update": {
11212+ "type": "boolean"
11213+ },
11214+ "external_content_display": {
11215+ "type": "string",
11216+ "enum": [
11217+ "always_display",
11218+ "ask_before_display"
11219+ ]
11220+ },
11221+ "login_required": {
11222+ "type": "boolean"
11223+ }
11224+ }
11225+ },
1114011226 "schema.SiteSeoReq": {
1114111227 "type": "object",
1114211228 "required": [
0 commit comments