Fix swagger doc and rename references for time db fields

This commit is contained in:
Jamie Curnow 2023-05-29 08:50:27 +10:00
parent a2f192280b
commit 1ae247b2a6
No known key found for this signature in database
GPG Key ID: FFBB624C43388E9E
45 changed files with 236 additions and 316 deletions

View File

@ -4,8 +4,8 @@
"additionalProperties": false,
"required": [
"id",
"created_on",
"modified_on",
"created_at",
"updated_at",
"name",
"acmesh_server",
"ca_bundle",
@ -18,13 +18,15 @@
"type": "integer",
"minimum": 1
},
"created_on": {
"created_at": {
"type": "integer",
"minimum": 1
"minimum": 1,
"description": "Created Unix time with milliseconds"
},
"modified_on": {
"updated_at": {
"type": "integer",
"minimum": 1
"minimum": 1,
"description": "Updated Unix time with milliseconds"
},
"name": {
"type": "string",

View File

@ -4,8 +4,8 @@
"additionalProperties": false,
"required": [
"id",
"created_on",
"modified_on",
"created_at",
"updated_at",
"expires_on",
"type",
"user_id",
@ -21,13 +21,15 @@
"type": "integer",
"minimum": 1
},
"created_on": {
"created_at": {
"type": "integer",
"minimum": 1
"minimum": 1,
"description": "Created Unix time with milliseconds"
},
"modified_on": {
"updated_at": {
"type": "integer",
"minimum": 1
"minimum": 1,
"description": "Updated Unix time with milliseconds"
},
"expires_on": {
"type": "integer",

View File

@ -4,8 +4,8 @@
"additionalProperties": false,
"required": [
"id",
"created_on",
"modified_on",
"created_at",
"updated_at",
"user_id",
"name",
"acmesh_name",
@ -17,13 +17,15 @@
"type": "integer",
"minimum": 1
},
"created_on": {
"created_at": {
"type": "integer",
"minimum": 1
"minimum": 1,
"description": "Created Unix time with milliseconds"
},
"modified_on": {
"updated_at": {
"type": "integer",
"minimum": 1
"minimum": 1,
"description": "Updated Unix time with milliseconds"
},
"user_id": {
"type": "integer",

View File

@ -4,8 +4,8 @@
"additionalProperties": false,
"required": [
"id",
"created_on",
"modified_on",
"created_at",
"updated_at",
"expires_on",
"user_id",
"provider",
@ -17,13 +17,15 @@
"type": "integer",
"minimum": 1
},
"created_on": {
"created_at": {
"type": "integer",
"minimum": 1
"minimum": 1,
"description": "Created Unix time with milliseconds"
},
"modified_on": {
"updated_at": {
"type": "integer",
"minimum": 1
"minimum": 1,
"description": "Updated Unix time with milliseconds"
},
"expires_on": {
"type": "integer",

View File

@ -4,8 +4,8 @@
"additionalProperties": false,
"required": [
"id",
"created_on",
"modified_on",
"created_at",
"updated_at",
"user_id",
"name",
"type",
@ -16,13 +16,15 @@
"type": "integer",
"minimum": 1
},
"created_on": {
"created_at": {
"type": "integer",
"minimum": 1
"minimum": 1,
"description": "Created Unix time with milliseconds"
},
"modified_on": {
"updated_at": {
"type": "integer",
"minimum": 1
"minimum": 1,
"description": "Updated Unix time with milliseconds"
},
"user_id": {
"type": "integer",

View File

@ -2,19 +2,21 @@
"type": "object",
"description": "SettingObject",
"additionalProperties": false,
"required": ["id", "name", "value"],
"required": ["id", "created_at", "updated_at", "name", "value"],
"properties": {
"id": {
"type": "integer",
"minimum": 1
},
"created_on": {
"created_at": {
"type": "integer",
"minimum": 1
"minimum": 1,
"description": "Created Unix time with milliseconds"
},
"modified_on": {
"updated_at": {
"type": "integer",
"minimum": 1
"minimum": 1,
"description": "Updated Unix time with milliseconds"
},
"name": {
"type": "string",

View File

@ -4,8 +4,8 @@
"additionalProperties": false,
"required": [
"id",
"created_on",
"modified_on",
"created_at",
"updated_at",
"expires_on",
"user_id",
"provider",
@ -17,13 +17,15 @@
"type": "integer",
"minimum": 1
},
"created_on": {
"created_at": {
"type": "integer",
"minimum": 1
"minimum": 1,
"description": "Created Unix time with milliseconds"
},
"modified_on": {
"updated_at": {
"type": "integer",
"minimum": 1
"minimum": 1,
"description": "Updated Unix time with milliseconds"
},
"expires_on": {
"type": "integer",

View File

@ -4,8 +4,8 @@
"additionalProperties": false,
"required": [
"id",
"created_on",
"modified_on",
"created_at",
"updated_at",
"user_id",
"name",
"nginx_template_id",
@ -25,13 +25,15 @@
"type": "integer",
"minimum": 1
},
"created_on": {
"created_at": {
"type": "integer",
"minimum": 1
"minimum": 1,
"description": "Created Unix time with milliseconds"
},
"modified_on": {
"updated_at": {
"type": "integer",
"minimum": 1
"minimum": 1,
"description": "Updated Unix time with milliseconds"
},
"user_id": {
"type": "integer",
@ -83,8 +85,8 @@
"additionalProperties": false,
"required": [
"id",
"created_on",
"modified_on",
"created_at",
"updated_at",
"upstream_id",
"server",
"weight",
@ -98,13 +100,15 @@
"type": "integer",
"minimum": 1
},
"created_on": {
"created_at": {
"type": "integer",
"minimum": 1
"minimum": 1,
"description": "Created Unix time with milliseconds"
},
"modified_on": {
"updated_at": {
"type": "integer",
"minimum": 1
"minimum": 1,
"description": "Updated Unix time with milliseconds"
},
"upstream_id": {
"type": "integer",

View File

@ -2,12 +2,22 @@
"type": "object",
"description": "UserAuthObject",
"additionalProperties": false,
"required": ["id", "user_id", "type", "created_on", "modified_on"],
"required": ["id", "user_id", "type", "created_at", "updated_at"],
"properties": {
"id": {
"type": "integer",
"minimum": 1
},
"created_at": {
"type": "integer",
"minimum": 1,
"description": "Created Unix time with milliseconds"
},
"updated_at": {
"type": "integer",
"minimum": 1,
"description": "Updated Unix time with milliseconds"
},
"user_id": {
"type": "integer",
"minimum": 1
@ -15,14 +25,6 @@
"type": {
"type": "string",
"pattern": "^password$"
},
"created_on": {
"type": "integer",
"minimum": 1
},
"modified_on": {
"type": "integer",
"minimum": 1
}
}
}

View File

@ -4,11 +4,11 @@
"additionalProperties": false,
"required": [
"id",
"created_at",
"updated_at",
"name",
"nickname",
"email",
"created_on",
"modified_on",
"is_disabled"
],
"properties": {
@ -16,6 +16,16 @@
"type": "integer",
"minimum": 1
},
"created_at": {
"type": "integer",
"minimum": 1,
"description": "Created Unix time with milliseconds"
},
"updated_at": {
"type": "integer",
"minimum": 1,
"description": "Updated Unix time with milliseconds"
},
"name": {
"type": "string",
"minLength": 2,
@ -31,14 +41,6 @@
"minLength": 5,
"maxLength": 150
},
"created_on": {
"type": "integer",
"minimum": 1
},
"modified_on": {
"type": "integer",
"minimum": 1
},
"gravatar_url": {
"type": "string"
},

View File

@ -33,8 +33,8 @@
"value": {
"result": {
"id": 1,
"created_on": 1627531400,
"modified_on": 1627531400,
"created_at": 1627531400000,
"updated_at": 1627531400000,
"name": "ZeroSSL",
"acmesh_server": "zerossl",
"ca_bundle": "",

View File

@ -42,8 +42,8 @@
"value": {
"result": {
"id": 1,
"created_on": 1627531400,
"modified_on": 1627531400,
"created_at": 1627531400000,
"updated_at": 1627531400000,
"name": "ZeroSSL",
"acmesh_server": "zerossl",
"ca_bundle": "",

View File

@ -60,8 +60,8 @@
"items": [
{
"id": 1,
"created_on": 1627531400,
"modified_on": 1627531400,
"created_at": 1627531400000,
"updated_at": 1627531400000,
"name": "ZeroSSL",
"acmesh_server": "zerossl",
"ca_bundle": "",
@ -71,8 +71,8 @@
},
{
"id": 2,
"created_on": 1627531400,
"modified_on": 1627531400,
"created_at": 1627531400000,
"updated_at": 1627531400000,
"name": "Let's Encrypt",
"acmesh_server": "https://acme-v02.api.letsencrypt.org/directory",
"ca_bundle": "",

View File

@ -29,8 +29,8 @@
"value": {
"result": {
"id": 1,
"created_on": 1627531400,
"modified_on": 1627531400,
"created_at": 1627531400000,
"updated_at": 1627531400000,
"name": "ZeroSSL",
"acmesh_server": "zerossl",
"ca_bundle": "",

View File

@ -1,9 +1,7 @@
{
"operationId": "getCertificate",
"summary": "Get a certificate object by ID",
"tags": [
"Certificates"
],
"tags": ["Certificates"],
"parameters": [
{
"in": "path",
@ -23,9 +21,7 @@
"content": {
"application/json": {
"schema": {
"required": [
"result"
],
"required": ["result"],
"properties": {
"result": {
"$ref": "#/components/schemas/CertificateObject"
@ -37,17 +33,15 @@
"value": {
"result": {
"id": 1,
"created_on": 1604536109,
"modified_on": 1604536109,
"created_at": 1604536109000,
"updated_at": 1604536109000,
"expires_on": null,
"type": "dns",
"user_id": 1,
"certificate_authority_id": 2,
"dns_provider_id": 1,
"name": "test1.jc21.com.au",
"domain_names": [
"test1.jc21.com.au"
],
"domain_names": ["test1.jc21.com.au"],
"is_ecc": 0,
"status": "ready"
}
@ -58,4 +52,4 @@
}
}
}
}
}

View File

@ -1,9 +1,7 @@
{
"operationId": "updateCertificate",
"summary": "Update an existing Certificate",
"tags": [
"Certificates"
],
"tags": ["Certificates"],
"parameters": [
{
"in": "path",
@ -32,9 +30,7 @@
"content": {
"application/json": {
"schema": {
"required": [
"result"
],
"required": ["result"],
"properties": {
"result": {
"$ref": "#/components/schemas/CertificateObject"
@ -46,17 +42,15 @@
"value": {
"result": {
"id": 1,
"created_on": 1604536109,
"modified_on": 1604536109,
"created_at": 1604536109000,
"updated_at": 1604536109000,
"expires_on": null,
"type": "dns",
"user_id": 1,
"certificate_authority_id": 2,
"dns_provider_id": 1,
"name": "test1.jc21.com.au",
"domain_names": [
"test1.jc21.com.au"
],
"domain_names": ["test1.jc21.com.au"],
"is_ecc": 0,
"status": "ready"
}
@ -67,4 +61,4 @@
}
}
}
}
}

View File

@ -1,9 +1,7 @@
{
"operationId": "getCertificates",
"summary": "Get a list of certificates",
"tags": [
"Certificates"
],
"tags": ["Certificates"],
"parameters": [
{
"in": "query",
@ -39,9 +37,7 @@
"content": {
"application/json": {
"schema": {
"required": [
"result"
],
"required": ["result"],
"properties": {
"result": {
"$ref": "#/components/schemas/CertificateList"
@ -64,8 +60,8 @@
"items": [
{
"id": 1,
"created_on": 1604536109,
"modified_on": 1604536109,
"created_at": 1604536109000,
"updated_at": 1604536109000,
"expires_on": null,
"type": "dns",
"user_id": 1,
@ -87,4 +83,4 @@
}
}
}
}
}

View File

@ -1,9 +1,7 @@
{
"operationId": "createCertificate",
"summary": "Create a new Certificate",
"tags": [
"Certificates"
],
"tags": ["Certificates"],
"requestBody": {
"description": "Certificate to create",
"required": true,
@ -19,9 +17,7 @@
"content": {
"application/json": {
"schema": {
"required": [
"result"
],
"required": ["result"],
"properties": {
"result": {
"$ref": "#/components/schemas/CertificateObject"
@ -33,17 +29,15 @@
"value": {
"result": {
"id": 1,
"created_on": 1604536109,
"modified_on": 1604536109,
"created_at": 1604536109000,
"updated_at": 1604536109000,
"expires_on": null,
"type": "dns",
"user_id": 1,
"certificate_authority_id": 2,
"dns_provider_id": 1,
"name": "test1.jc21.com.au",
"domain_names": [
"test1.jc21.com.au"
],
"domain_names": ["test1.jc21.com.au"],
"is_ecc": 0,
"status": "ready"
}
@ -54,4 +48,4 @@
}
}
}
}
}

View File

@ -60,8 +60,8 @@
"items": [
{
"id": 1,
"created_on": 1602593653,
"modified_on": 1602593653,
"created_at": 1602593653000,
"updated_at": 1602593653000,
"user_id": 1,
"name": "Route53",
"acmesh_name": "dns_aws",

View File

@ -29,8 +29,8 @@
"value": {
"result": {
"id": 1,
"created_on": 1602593653,
"modified_on": 1602593653,
"created_at": 1602593653000,
"updated_at": 1602593653000,
"user_id": 1,
"name": "Route53",
"acmesh_name": "dns_aws",

View File

@ -33,8 +33,8 @@
"value": {
"result": {
"id": 1,
"created_on": 1602593653,
"modified_on": 1602593653,
"created_at": 1602593653000,
"updated_at": 1602593653000,
"user_id": 1,
"name": "Route53",
"acmesh_name": "dns_aws",

View File

@ -43,8 +43,8 @@
"result": {
"result": {
"id": 1,
"created_on": 1602593653,
"modified_on": 1602593653,
"created_at": 1602593653000,
"updated_at": 1602593653000,
"user_id": 1,
"name": "Route53",
"acmesh_name": "dns_aws",

View File

@ -60,8 +60,8 @@
"items": [
{
"id": 1,
"created_on": 1646279455,
"modified_on": 1646279455,
"created_at": 1646279455000,
"updated_at": 1646279455000,
"user_id": 2,
"type": "proxy",
"nginx_template_id": 1,

View File

@ -33,8 +33,8 @@
"value": {
"result": {
"id": 1,
"created_on": 1646279455,
"modified_on": 1646279455,
"created_at": 1646279455000,
"updated_at": 1646279455000,
"user_id": 2,
"type": "proxy",
"nginx_template_id": 1,

View File

@ -42,8 +42,8 @@
"value": {
"result": {
"id": 1,
"created_on": 1646279455,
"modified_on": 1646279455,
"created_at": 1646279455000,
"updated_at": 1646279455000,
"user_id": 2,
"type": "proxy",
"nginx_template_id": 1,

View File

@ -29,8 +29,8 @@
"value": {
"result": {
"id": 1,
"created_on": 1645700556,
"modified_on": 1645700556,
"created_at": 1645700556000,
"updated_at": 1645700556000,
"user_id": 2,
"type": "proxy",
"nginx_template_id": 1,

View File

@ -53,15 +53,15 @@
"limit": 10,
"sort": [
{
"field": "created_on",
"field": "created_at",
"direction": "ASC"
}
],
"items": [
{
"id": 1,
"created_on": 1646218093,
"modified_on": 1646218093,
"created_at": 1646218093000,
"updated_at": 1646218093000,
"user_id": 1,
"name": "Default Proxy Template",
"type": "proxy",

View File

@ -29,8 +29,8 @@
"value": {
"result": {
"id": 10,
"created_on": 1646218093,
"modified_on": 1646218093,
"created_at": 1646218093000,
"updated_at": 1646218093000,
"user_id": 1,
"name": "My proxy template",
"type": "proxy",

View File

@ -33,8 +33,8 @@
"value": {
"result": {
"id": 1,
"created_on": 1646218093,
"modified_on": 1646218093,
"created_at": 1646218093000,
"updated_at": 1646218093000,
"user_id": 1,
"name": "Default Proxy Template",
"type": "proxy",

View File

@ -42,8 +42,8 @@
"value": {
"result": {
"id": 1,
"created_on": 1646218093,
"modified_on": 1646218093,
"created_at": 1646218093000,
"updated_at": 1646218093000,
"user_id": 1,
"name": "My renamed proxy template",
"type": "proxy",

View File

@ -1,9 +1,7 @@
{
"operationId": "getSettings",
"summary": "Get a list of settings",
"tags": [
"Settings"
],
"tags": ["Settings"],
"parameters": [
{
"in": "query",
@ -39,9 +37,7 @@
"content": {
"application/json": {
"schema": {
"required": [
"result"
],
"required": ["result"],
"properties": {
"result": {
"$ref": "#/components/schemas/SettingList"
@ -64,8 +60,8 @@
"items": [
{
"id": 1,
"created_on": 1578010090,
"modified_on": 1578010095,
"created_at": 1578010090000,
"updated_at": 1578010095000,
"name": "default-site",
"value": {
"html": "<p>not found</p>",
@ -81,4 +77,4 @@
}
}
}
}
}

View File

@ -1,9 +1,7 @@
{
"operationId": "getSetting",
"summary": "Get a setting object by name",
"tags": [
"Settings"
],
"tags": ["Settings"],
"parameters": [
{
"in": "path",
@ -23,9 +21,7 @@
"content": {
"application/json": {
"schema": {
"required": [
"result"
],
"required": ["result"],
"properties": {
"result": {
"$ref": "#/components/schemas/SettingObject"
@ -37,8 +33,8 @@
"value": {
"result": {
"id": 2,
"created_on": 1578010090,
"modified_on": 1578010095,
"created_at": 1578010090000,
"updated_at": 1578010095000,
"name": "default-site",
"value": {
"html": "<p>not found</p>",
@ -52,4 +48,4 @@
}
}
}
}
}

View File

@ -1,9 +1,7 @@
{
"operationId": "updateSetting",
"summary": "Update an existing Setting",
"tags": [
"Settings"
],
"tags": ["Settings"],
"parameters": [
{
"in": "path",
@ -32,9 +30,7 @@
"content": {
"application/json": {
"schema": {
"required": [
"result"
],
"required": ["result"],
"properties": {
"result": {
"$ref": "#/components/schemas/SettingObject"
@ -46,8 +42,8 @@
"value": {
"result": {
"id": 2,
"created_on": 1578010090,
"modified_on": 1578010090,
"created_at": 1578010090000,
"updated_at": 1578010090000,
"name": "default-site",
"value": {
"html": "<p>not found</p>",
@ -61,4 +57,4 @@
}
}
}
}
}

View File

@ -1,9 +1,7 @@
{
"operationId": "createSetting",
"summary": "Create a new Setting",
"tags": [
"Settings"
],
"tags": ["Settings"],
"requestBody": {
"description": "Setting to Create",
"required": true,
@ -19,9 +17,7 @@
"content": {
"application/json": {
"schema": {
"required": [
"result"
],
"required": ["result"],
"properties": {
"result": {
"$ref": "#/components/schemas/SettingObject"
@ -33,8 +29,8 @@
"value": {
"result": {
"id": 2,
"created_on": 1578010090,
"modified_on": 1578010090,
"created_at": 1578010090000,
"updated_at": 1578010090000,
"name": "default-site",
"value": {
"html": "<p>not found</p>",
@ -48,4 +44,4 @@
}
}
}
}
}

View File

@ -60,8 +60,8 @@
"items": [
{
"id": 1,
"created_on": 1672804124,
"modified_on": 1672804124,
"created_at": 1672804124000,
"updated_at": 1672804124000,
"user_id": 2,
"name": "API servers",
"nginx_template_id": 5,
@ -77,8 +77,8 @@
"servers": [
{
"id": 1,
"created_on": 1672804124,
"modified_on": 1672804124,
"created_at": 1672804124000,
"updated_at": 1672804124000,
"upstream_group_id": 1,
"server": "192.168.0.10:80",
"weight": 100,
@ -89,8 +89,8 @@
},
{
"id": 2,
"created_on": 1672804124,
"modified_on": 1672804124,
"created_at": 1672804124000,
"updated_at": 1672804124000,
"upstream_group_id": 1,
"server": "192.168.0.11:80",
"weight": 50,
@ -103,8 +103,8 @@
},
{
"id": 2,
"created_on": 1672804197,
"modified_on": 1672804197,
"created_at": 1672804197000,
"updated_at": 1672804197000,
"user_id": 2,
"name": "API servers 2",
"nginx_template_id": 5,
@ -120,8 +120,8 @@
"servers": [
{
"id": 3,
"created_on": 1672804197,
"modified_on": 1672804197,
"created_at": 1672804197000,
"updated_at": 1672804197000,
"upstream_group_id": 2,
"server": "192.168.0.10:80",
"weight": 100,
@ -132,8 +132,8 @@
},
{
"id": 4,
"created_on": 1672804197,
"modified_on": 1672804197,
"created_at": 1672804197000,
"updated_at": 1672804197000,
"upstream_group_id": 2,
"server": "192.168.0.11:80",
"weight": 50,
@ -146,8 +146,8 @@
},
{
"id": 3,
"created_on": 1672804200,
"modified_on": 1672804200,
"created_at": 1672804200000,
"updated_at": 1672804200000,
"user_id": 2,
"name": "API servers 2",
"nginx_template_id": 5,
@ -163,8 +163,8 @@
"servers": [
{
"id": 5,
"created_on": 1672804200,
"modified_on": 1672804200,
"created_at": 1672804200000,
"updated_at": 1672804200000,
"upstream_group_id": 3,
"server": "192.168.0.10:80",
"weight": 100,
@ -175,8 +175,8 @@
},
{
"id": 6,
"created_on": 1672804200,
"modified_on": 1672804200,
"created_at": 1672804200000,
"updated_at": 1672804200000,
"upstream_group_id": 3,
"server": "192.168.0.11:80",
"weight": 50,
@ -189,8 +189,8 @@
},
{
"id": 4,
"created_on": 1672804201,
"modified_on": 1672804201,
"created_at": 1672804201000,
"updated_at": 1672804201000,
"user_id": 2,
"name": "API servers 2",
"nginx_template_id": 5,
@ -206,8 +206,8 @@
"servers": [
{
"id": 7,
"created_on": 1672804201,
"modified_on": 1672804201,
"created_at": 1672804201000,
"updated_at": 1672804201000,
"upstream_group_id": 4,
"server": "192.168.0.10:80",
"weight": 100,
@ -218,8 +218,8 @@
},
{
"id": 8,
"created_on": 1672804201,
"modified_on": 1672804201,
"created_at": 1672804201000,
"updated_at": 1672804201000,
"upstream_group_id": 4,
"server": "192.168.0.11:80",
"weight": 50,
@ -232,8 +232,8 @@
},
{
"id": 5,
"created_on": 1672804201,
"modified_on": 1672804201,
"created_at": 1672804201000,
"updated_at": 1672804201000,
"user_id": 2,
"name": "API servers 2",
"nginx_template_id": 5,
@ -249,8 +249,8 @@
"servers": [
{
"id": 9,
"created_on": 1672804201,
"modified_on": 1672804201,
"created_at": 1672804201000,
"updated_at": 1672804201000,
"upstream_group_id": 5,
"server": "192.168.0.10:80",
"weight": 100,
@ -261,8 +261,8 @@
},
{
"id": 10,
"created_on": 1672804201,
"modified_on": 1672804201,
"created_at": 1672804201000,
"updated_at": 1672804201000,
"upstream_group_id": 5,
"server": "192.168.0.11:80",
"weight": 50,

View File

@ -29,8 +29,8 @@
"value": {
"result": {
"id": 6,
"created_on": 1672806857,
"modified_on": 1672806857,
"created_at": 1672806857000,
"updated_at": 1672806857000,
"user_id": 2,
"name": "API servers 2",
"nginx_template_id": 5,
@ -46,8 +46,8 @@
"servers": [
{
"id": 11,
"created_on": 1672806857,
"modified_on": 1672806857,
"created_at": 1672806857000,
"updated_at": 1672806857000,
"upstream_id": 6,
"server": "192.168.0.10:80",
"weight": 100,
@ -58,8 +58,8 @@
},
{
"id": 12,
"created_on": 1672806857,
"modified_on": 1672806857,
"created_at": 1672806857000,
"updated_at": 1672806857000,
"upstream_id": 6,
"server": "192.168.0.11:80",
"weight": 50,

View File

@ -33,8 +33,8 @@
"value": {
"result": {
"id": 1,
"created_on": 1672786008,
"modified_on": 1672786008,
"created_at": 1672786008000,
"updated_at": 1672786008000,
"user_id": 2,
"name": "API servers 3",
"ip_hash": true,
@ -47,8 +47,8 @@
"servers": [
{
"id": 1,
"created_on": 1672786009,
"modified_on": 1672786009,
"created_at": 1672786009000,
"updated_at": 1672786009000,
"upstream_id": 1,
"server": "api1.localhost:1234",
"weight": 100,
@ -59,8 +59,8 @@
},
{
"id": 2,
"created_on": 1672786009,
"modified_on": 1672786009,
"created_at": 1672786009000,
"updated_at": 1672786009000,
"upstream_id": 1,
"server": "api2.localhost:1234",
"weight": 50,

View File

@ -42,8 +42,8 @@
"value": {
"result": {
"id": 1,
"created_on": 1673234177,
"modified_on": 1673244559,
"created_at": 1673234177000,
"updated_at": 1673244559000,
"user_id": 2,
"name": "API servers 2",
"nginx_template_id": 5,
@ -59,8 +59,8 @@
"servers": [
{
"id": 1,
"created_on": 1673234177,
"modified_on": 1673244559,
"created_at": 1673234177000,
"updated_at": 1673244559000,
"upstream_id": 1,
"server": "192.168.0.10:80",
"weight": 100,
@ -71,8 +71,8 @@
},
{
"id": 2,
"created_on": 1673234177,
"modified_on": 1673244559,
"created_at": 1673234177000,
"updated_at": 1673244559000,
"upstream_id": 1,
"server": "192.168.0.11:80",
"weight": 50,

View File

@ -71,8 +71,8 @@
"name": "Jamie Curnow",
"nickname": "James",
"email": "jc@jc21.com",
"created_on": 1578010090,
"modified_on": 1578010095,
"created_at": 1578010090000,
"updated_at": 1578010095000,
"gravatar_url": "https://www.gravatar.com/avatar/6193176330f8d38747f038c170ddb193?d=mm&r=pg&s=128",
"is_disabled": false,
"capabilities": ["full-admin"]
@ -82,8 +82,8 @@
"name": "John Doe",
"nickname": "John",
"email": "johdoe@example.com",
"created_on": 1578010100,
"modified_on": 1578010105,
"created_at": 1578010100000,
"updated_at": 1578010105000,
"gravatar_url": "https://www.gravatar.com/avatar/6193176330f8d38747f038c170ddb193?d=mm&r=pg&s=128",
"is_disabled": false,
"capabilities": [
@ -96,8 +96,8 @@
"name": "Jane Doe",
"nickname": "Jane",
"email": "janedoe@example.com",
"created_on": 1578010110,
"modified_on": 1578010115,
"created_at": 1578010110000,
"updated_at": 1578010115000,
"gravatar_url": "https://www.gravatar.com/avatar/6193176330f8d38747f038c170ddb193?d=mm&r=pg&s=128",
"is_disabled": false,
"capabilities": [

View File

@ -32,8 +32,8 @@
"name": "Jamie Curnow",
"nickname": "James",
"email": "jc@jc21.com",
"created_on": 1578010100,
"modified_on": 1578010100,
"created_at": 1578010100000,
"updated_at": 1578010100000,
"gravatar_url": "https://www.gravatar.com/avatar/6193176330f8d38747f038c170ddb193?d=mm&r=pg&s=128",
"is_disabled": false,
"auth": {

View File

@ -50,10 +50,10 @@
"value": {
"result": {
"id": 2,
"created_at": 1648422222000,
"updated_at": 1648423979000,
"user_id": 3,
"type": "password",
"created_on": 1648422222,
"modified_on": 1648423979
"type": "password"
}
}
}

View File

@ -44,8 +44,8 @@
"name": "Jamie Curnow",
"nickname": "James",
"email": "jc@jc21.com",
"created_on": 1578010100,
"modified_on": 1578010105,
"created_at": 1578010100000,
"updated_at": 1578010105000,
"gravatar_url": "https://www.gravatar.com/avatar/6193176330f8d38747f038c170ddb193?d=mm&r=pg&s=128",
"is_disabled": false,
"capabilities": ["full-admin"]

View File

@ -53,8 +53,8 @@
"name": "Jamie Curnow",
"nickname": "James",
"email": "jc@jc21.com",
"created_on": 1578010100,
"modified_on": 1578010110,
"created_at": 1578010100000,
"updated_at": 1578010110000,
"gravatar_url": "https://www.gravatar.com/avatar/6193176330f8d38747f038c170ddb193?d=mm&r=pg&s=128",
"is_disabled": false,
"capabilities": ["full-admin"]

View File

@ -21,67 +21,3 @@ func GetByUserIDType(userID uint, authType string) (Model, error) {
First(&auth)
return auth, result.Error
}
/*
// Create will create a Auth from this model
func Create(auth *Model) (int, error) {
if auth.ID != 0 {
return 0, eris.New("Cannot create auth when model already has an ID")
}
auth.Touch(true)
db := database.GetInstance()
// nolint: gosec
result, err := db.NamedExec(`INSERT INTO `+fmt.Sprintf("`%s`", tableName)+` (
created_on,
modified_on,
user_id,
type,
secret,
is_deleted
) VALUES (
:created_on,
:modified_on,
:user_id,
:type,
:secret,
:is_deleted
)`, auth)
if err != nil {
return 0, err
}
last, lastErr := result.LastInsertId()
if lastErr != nil {
return 0, lastErr
}
return int(last), nil
}
*/
/*
// Update will Update a Auth from this model
func Update(auth *Model) error {
if auth.ID == 0 {
return eris.New("Cannot update auth when model doesn't have an ID")
}
auth.Touch(false)
db := database.GetInstance()
// nolint: gosec
_, err := db.NamedExec(`UPDATE `+fmt.Sprintf("`%s`", tableName)+` SET
created_on = :created_on,
modified_on = :modified_on,
user_id = :user_id,
type = :type,
secret = :secret,
is_deleted = :is_deleted
WHERE id = :id`, auth)
return err
}
*/

View File

@ -17,7 +17,7 @@ func List(pageInfo model.PageInfo, filters []model.Filter) (entity.ListResponse,
var result entity.ListResponse
defaultSort := model.Sort{
Field: "created_on",
Field: "created_at",
Direction: "ASC",
}