Skip to content

Commit

Permalink
Let's try to make it a bit faster
Browse files Browse the repository at this point in the history
  • Loading branch information
Tim203 committed Aug 27, 2024
1 parent 07f44c0 commit bd221cb
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 1 addition & 1 deletion lib/global_api/skins/skin_storage.ex
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ defmodule GlobalApi.Skins.SkinStorage do
])
|> Jason.encode!()

identifier = Blake2.hash2b(final_data, 32)
identifier = :crypto.hash(:blake2b, final_data)

DatabaseQueue.async_fn_call(fn ->
Repo.insert(%Schema{hash: identifier, skin: final_data, code: convert_code}, on_conflict: :nothing)
Expand Down
1 change: 0 additions & 1 deletion mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ defmodule GlobalApi.MixProject do
# Type `mix help deps` for examples and options.
defp deps do
[
{:blake2, "~> 1.0.4"},
{:phoenix, "~> 1.6.13"},
{:phoenix_live_reload, "~> 1.3.3", only: :dev},
{:phoenix_live_view, "~> 0.18.1"},
Expand Down

0 comments on commit bd221cb

Please sign in to comment.