реализация 3 лабы

This commit is contained in:
Ванек
2026-10-29 14:51:19 +03:00
parent 74aa224251
commit 64ea89d040
28 changed files with 2411 additions and 243 deletions
+2 -1
View File
@@ -22,6 +22,7 @@ chat_id="$(jq -nc --arg a "$alice_id" --arg b "$bob_id" '{title:"Учебный
--data-binary @- "$base_url/api/v1/chats" | jq -er '.id')"
for token in "$alice_token" "$bob_token"; do
curl -fsS -H "Authorization: Bearer $token" -H 'Content-Type: application/json' \
-d '{"text":"Привет из lab2! 👋"}' "$base_url/api/v1/chats/$chat_id/messages" | jq .
-H "Idempotency-Key: demo-$RANDOM-$RANDOM" \
-d '{"text":"Привет из lab3! 👋"}' "$base_url/api/v1/chats/$chat_id/messages" | jq .
done
curl -fsS -H "Authorization: Bearer $bob_token" "$base_url/api/v1/chats/$chat_id/messages" | jq .