From 53f37c8bbbd4d3eae51830fb752004c620006ce6 Mon Sep 17 00:00:00 2001 From: Viktor Vsk Date: Wed, 29 Nov 2023 21:40:26 +0100 Subject: [PATCH] REQ and COUNT commands to properly validaate schema for until/since --- app/relay/nostr.rb | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/app/relay/nostr.rb b/app/relay/nostr.rb index 0a27f82..3c1d1b4 100644 --- a/app/relay/nostr.rb +++ b/app/relay/nostr.rb @@ -67,7 +67,16 @@ module Nostr minLength: 64, # Not part of NIP-11 but it doesn't make sense maxLength: 64 } + }, + until: { + type: "integer", + minimum: 0 + }, + since: { + type: "integer", + minimum: 0 } + } } }, @@ -287,6 +296,14 @@ module Nostr type: :string, minLength: 64, maxLength: 64 + }, + until: { + type: "integer", + minimum: 0 + }, + since: { + type: "integer", + minimum: 0 } } }