aboutsummaryrefslogtreecommitdiff
path: root/units/ib_cache.zsh
diff options
context:
space:
mode:
Diffstat (limited to 'units/ib_cache.zsh')
-rw-r--r--units/ib_cache.zsh9
1 files changed, 2 insertions, 7 deletions
diff --git a/units/ib_cache.zsh b/units/ib_cache.zsh
index e091207..ac8b706 100644
--- a/units/ib_cache.zsh
+++ b/units/ib_cache.zsh
@@ -2,7 +2,7 @@
# Copyright (C) 2024-2026 Danil Lisin
# SPDX-License-Identifier: Apache-2.0
-ib_post="$(jq -c ".${ib_iarray}[$((idx - 1))]" "${ib_file}")"
+ib_post="$(jq -c ".[$((idx - 1))]" "${ib_file}")"
ib_query="id:${ib_id}"
ib_hash="$(sha1sum <<< "${user_id}${ib_board}${ib_query}" | cut -d ' ' -f 1)"
@@ -13,11 +13,6 @@ do
sleep 1
done
-if [[ -n "${ib_iarray}" ]]
-then
- printf '{"%s":[%s]}' "${ib_iarray}" "${ib_post}" | jq -c > "${ib_file}"
-else
- printf '[%s]' "${ib_post}" | jq -c > "${ib_file}"
-fi
+printf '[%s]' "${ib_post}" | jq -c > "${ib_file}"
rmdir "${cache}/${ib_hash}.lock"