mirror of
https://github.com/hkalexling/Mango.git
synced 2026-05-01 00:00:55 -04:00
- formating in storage.cr
This commit is contained in:
+2
-2
@@ -11,7 +11,7 @@ def verify_password(hash, pw)
|
|||||||
(Crypto::Bcrypt::Password.new hash).verify pw
|
(Crypto::Bcrypt::Password.new hash).verify pw
|
||||||
end
|
end
|
||||||
|
|
||||||
def random_str()
|
def random_str
|
||||||
Base64.strict_encode UUID.random().to_s
|
Base64.strict_encode UUID.random().to_s
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -88,7 +88,7 @@ class Storage
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def list_users()
|
def list_users
|
||||||
results = Array(Tuple(String, Bool)).new
|
results = Array(Tuple(String, Bool)).new
|
||||||
DB.open "sqlite3://#{@path}" do |db|
|
DB.open "sqlite3://#{@path}" do |db|
|
||||||
db.query "select username, admin from users" do |rs|
|
db.query "select username, admin from users" do |rs|
|
||||||
|
|||||||
Reference in New Issue
Block a user