Browse Source

Improve

master
Skylar Ittner 6 months ago
parent
commit
c2cc007106
  1. BIN
      database.mwb
  2. BIN
      database.mwb.bak
  3. 10
      endpoints/notary.fetchkey.php
  4. 2
      endpoints/notary.publishkey.php

BIN
database.mwb

BIN
database.mwb.bak

10
endpoints/notary.fetchkey.php

@ -25,12 +25,12 @@ $out = [];
foreach ($results as $r) {
$out[] = [
"fingerprint" => $r["fingerprint"],
"name" => $r["name"],
"email" => $r["email"],
"location" => $r["location"],
"name" => empty($r["name"]) ? null : $r["name"],
"email" => empty($r["email"]) ? null : $r["email"],
"location" => empty($r["location"]) ? null : $r["location"],
"commissionexpires" => (is_null($r["commissionexpires"]) ? null : strtotime($r["commissionexpires"])),
"idnumber" => $r["idnumber"],
"state" => $r["state"],
"idnumber" => empty($r["idnumber"]) ? null : $r["idnumber"],
"state" => empty($r["state"]) ? null : $r["state"],
"publickey" => $r["publickey"]
];
}

2
endpoints/notary.publishkey.php

@ -11,7 +11,7 @@ $pubkey = $VARS["publickey"];
$name = $VARS["name"] ?? null;
$email = filter_var($VARS["email"] ?? "", FILTER_VALIDATE_EMAIL) ? $VARS["email"] : null;
$location = $VARS["location"] ?? null;
$commissionexpires = (strtotime($VARS["expires"]) === false || strtotime($VARS["expires"]) <= time()) ? null : date("Y-m-d H:i:s", strtotime($VARS["expires"]));
$commissionexpires = (empty($VARS["expires"]) || strtotime($VARS["expires"]) === false || strtotime($VARS["expires"]) <= time()) ? null : date("Y-m-d H:i:s", strtotime($VARS["expires"]));
$idnumber = $VARS["idnumber"] ?? null;
$state = $VARS["state"] ?? null;

Loading…
Cancel
Save