feat: complete leave approval MVP

This commit is contained in:
selfrelease
2026-07-18 19:20:07 +08:00
parent 2105fe3bac
commit 090a7e33ce
133 changed files with 7845 additions and 100 deletions
+16 -1
View File
@@ -25,8 +25,23 @@ for username in employee manager admin hr; do
--data-urlencode password="${password}"
} | jq -r .access_token)"
case "${username}" in
employee) device_id='10000000-0000-4000-8000-000000000001' ;;
manager) device_id='10000000-0000-4000-8000-000000000002' ;;
admin) device_id='10000000-0000-4000-8000-000000000003' ;;
hr) device_id='10000000-0000-4000-8000-000000000004' ;;
esac
curl --fail --silent --show-error \
-X POST "${backend_url}/api/v1/devices/register" \
-H "Authorization: Bearer ${token}" \
-H 'Content-Type: application/json' \
--data "{\"id\":\"${device_id}\",\"name\":\"Local auth verifier (${username})\",\"platform\":\"OTHER\",\"appVersion\":\"script\"}" \
>/dev/null
printf '%s\n' "${username}"
curl --fail --silent --show-error \
"${backend_url}/api/v1/me" \
-H "Authorization: Bearer ${token}" | jq .
-H "Authorization: Bearer ${token}" \
-H "X-AIOA-Device-Id: ${device_id}" | jq .
done