From 690da84f186a3d2801a7d09715962ec1003d6e0b Mon Sep 17 00:00:00 2001 From: Archivist Date: Mon, 9 Jul 2018 15:35:10 +0200 Subject: [PATCH] added use consultation query --- src/sales_backend.cr | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/sales_backend.cr b/src/sales_backend.cr index fd88de9..2165cc3 100644 --- a/src/sales_backend.cr +++ b/src/sales_backend.cr @@ -90,6 +90,10 @@ post "/user" do |context| "OK".to_json end +get "/user" do |context| + authenticate!(context.request.headers["user"],UUID.new(context.request.headers["api_token"])).to_json +end + # Creates a WebSocket handler. # Matches "ws://host:port/socket" ws "/socket" do |socket|