From 4b94f729623ff74359ebe6dfb8a6d5bf5a58008b Mon Sep 17 00:00:00 2001 From: Luka Vandervelden Date: Thu, 12 Dec 2019 00:45:12 +0100 Subject: [PATCH] Updated code to match more recent dependencies. --- shard.yml | 4 ++-- src/main.cr | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/shard.yml b/shard.yml index 513d755..b8dc65f 100644 --- a/shard.yml +++ b/shard.yml @@ -24,8 +24,8 @@ dependencies: jwt: github: crystal-community/jwt branch: master - fs: - git: https://git.karchnu.fr/WeirdOS/fs.cr + dodb: + git: https://git.karchnu.fr/WeirdOS/dodb.cr branch: master license: EUPL diff --git a/src/main.cr b/src/main.cr index 6633f91..c14de1c 100644 --- a/src/main.cr +++ b/src/main.cr @@ -5,7 +5,7 @@ require "openssl" require "jwt" require "passwd" require "ipc" -require "fs" +require "dodb" require "./authd.cr" @@ -86,7 +86,7 @@ class AuthD::Service return Response::Error.new "invalid token" unless user - storage = FS::Hash(String, JSON::Any).new "#{@extras_root}/#{user.uid}" + storage = DODB::DataBase(String, JSON::Any).new "#{@extras_root}/#{user.uid}" Response::Extra.new user.uid, request.name, storage[request.name]? when Request::SetExtra @@ -94,7 +94,7 @@ class AuthD::Service return Response::Error.new "invalid token" unless user - storage = FS::Hash(String, JSON::Any).new "#{@extras_root}/#{user.uid}" + storage = DODB::DataBase(String, JSON::Any).new "#{@extras_root}/#{user.uid}" storage[request.name] = request.extra