mirror of
https://git.ari.lt/ari.lt/ari.lt.git
synced 2025-02-04 17:49:24 +01:00
Standartisise the API hashing
Signed-off-by: Ari Archer <ari.web.xyz@gmail.com>
This commit is contained in:
parent
52bdd26d93
commit
8553b253a5
2 changed files with 3 additions and 3 deletions
|
@ -30,8 +30,8 @@ slow, so there's hashes for them, they are sha256 hashes of
|
||||||
those JSON files in the api
|
those JSON files in the api
|
||||||
|
|
||||||
So what you do, replace all `.` in the API name with \_,
|
So what you do, replace all `.` in the API name with \_,
|
||||||
then make the request to `/api_hash/....txt` and you will
|
then make the request to `/api_hash/..._hash.txt` and you will
|
||||||
get the hash, for example: <https://www.ari-web.xyz/api_hash/apis_json.txt>
|
get the hash, for example: <https://www.ari-web.xyz/api_hash/apis_json_hash.txt>
|
||||||
|
|
||||||
# Usage API
|
# Usage API
|
||||||
|
|
||||||
|
|
|
@ -30,7 +30,7 @@ main() {
|
||||||
|
|
||||||
for api in api/*; do
|
for api in api/*; do
|
||||||
api_base="${api##*/}"
|
api_base="${api##*/}"
|
||||||
sha256sum "$api" | awk '{ print $1 }' >"api_hash/${api_base//./_}.txt"
|
sha256sum "$api" | awk '{ print $1 }' | tr -d '\n' >"api_hash/${api_base//./_}_hash.txt"
|
||||||
done
|
done
|
||||||
|
|
||||||
echo 'done'
|
echo 'done'
|
||||||
|
|
Loading…
Add table
Reference in a new issue