serial number and cert hash route
All checks were successful
Build and Test / account (push) Successful in 3m16s

This commit is contained in:
red binder 2026-07-16 02:06:51 +02:00
commit 9bf06fffd6
12 changed files with 122 additions and 59 deletions

View file

@ -0,0 +1,28 @@
{
"db_name": "PostgreSQL",
"query": "select serial from certificates where hash = $1",
"describe": {
"columns": [
{
"ordinal": 0,
"name": "serial",
"type_info": "Varchar",
"origin": {
"Table": {
"table": "certificates",
"name": "serial"
}
}
}
],
"parameters": {
"Left": [
"Bytea"
]
},
"nullable": [
true
]
},
"hash": "0ef5f08a84d6864291cb6125610d9d3e1961530ae963f9ab5442482d81228590"
}

View file

@ -1,21 +0,0 @@
{
"db_name": "PostgreSQL",
"query": "SELECT nextval('pid_counter') as pid",
"describe": {
"columns": [
{
"ordinal": 0,
"name": "pid",
"type_info": "Int8",
"origin": "Expression"
}
],
"parameters": {
"Left": []
},
"nullable": [
null
]
},
"hash": "3c9b1695f8ae49e4308c048de98c1c262351465b6f102e98912f67442a1f54d9"
}

View file

@ -68,6 +68,17 @@
"name": "expires"
}
}
},
{
"ordinal": 6,
"name": "cert_hash",
"type_info": "Bytea",
"origin": {
"Table": {
"table": "tokens",
"name": "cert_hash"
}
}
}
],
"parameters": {
@ -83,7 +94,8 @@
false,
false,
true,
false
false,
true
]
},
"hash": "48710e0b87742cc3fef816b3c95604095f71324011e7093ec37af15da8c158f4"

View file

@ -68,6 +68,17 @@
"name": "expires"
}
}
},
{
"ordinal": 6,
"name": "cert_hash",
"type_info": "Bytea",
"origin": {
"Table": {
"table": "tokens",
"name": "cert_hash"
}
}
}
],
"parameters": {
@ -83,7 +94,8 @@
false,
false,
true,
false
false,
true
]
},
"hash": "9d3cee43a86cead9a6d078abc1266fc2a97ac6e25a9733d1d20faf555c67abe1"

View file

@ -0,0 +1,15 @@
{
"db_name": "PostgreSQL",
"query": "update certificates set serial = $1 where hash = $2",
"describe": {
"columns": [],
"parameters": {
"Left": [
"Varchar",
"Bytea"
]
},
"nullable": []
},
"hash": "beeeea07993ba8daac1e43c985e8c840f66eec4e5458d3709c0e0f09afe51377"
}

View file

@ -1,23 +0,0 @@
{
"db_name": "PostgreSQL",
"query": "SELECT EXISTS(select 1 from users where pid = $1)",
"describe": {
"columns": [
{
"ordinal": 0,
"name": "exists",
"type_info": "Bool",
"origin": "Expression"
}
],
"parameters": {
"Left": [
"Int4"
]
},
"nullable": [
null
]
},
"hash": "c8d50662530cac49c4261fb321cd15f9e4bafdfca12d2130a873d44a88dd435b"
}

View file

@ -1,6 +1,6 @@
{
"db_name": "PostgreSQL",
"query": "insert into tokens (token_type, pid, title_id)\n values ($1, $2, $3) returning token_id, random",
"query": "insert into tokens (token_type, pid, title_id, cert_hash)\n values ($1, $2, $3, $4) returning token_id, random",
"describe": {
"columns": [
{
@ -30,7 +30,8 @@
"Left": [
"Int4",
"Int4",
"Varchar"
"Varchar",
"Bytea"
]
},
"nullable": [
@ -38,5 +39,5 @@
false
]
},
"hash": "e5a2f7f28c3d7b9524d3dce48a9e47d6180ff634ebf59f3a1efd92b797170ac2"
"hash": "d8298703381f0e220bdbe122dbdc4dc5cd7ae99fac34ae16023f9a6a701857c9"
}