Use base58 for random strings

This commit is contained in:
2024-07-08 22:33:52 -03:00
parent 56ff326098
commit 6489ec0dc2
3 changed files with 6 additions and 8 deletions

View File

@ -1,3 +1,4 @@
require "base58"
require "docr"
require "kemal"
require "../funko.cr"
@ -34,7 +35,7 @@ module Funko
# mosquito-cr/mosquito to make it a job queue
post "/funkos/build/" do |env|
# Create place to build funko
tmp_dir = Path.new("tmp", UUID.random.to_s)
tmp_dir = Path.new("tmp", Random.base58(8))
Dir.mkdir_p(tmp_dir) unless File.exists? tmp_dir
# Expand tarball in there