feat: complete leave approval MVP
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user