feat: add TextWidget
add TextWidget CRUD api add basic tests for API
This commit is contained in:
parent
13cfd2961f
commit
c66645cbdd
18 changed files with 536 additions and 1 deletions
20
cmd/curl_post_text_widget.sh
Executable file
20
cmd/curl_post_text_widget.sh
Executable file
|
|
@ -0,0 +1,20 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# TOKEN="your_api_token_here"
|
||||
# ensure to have set TOKEN to a valid value before running
|
||||
# ideally add this to an .envrc file and source it
|
||||
# only the admin user can create entries so this should
|
||||
# fail unless .env has ADMIN_EMAIL set to the user that
|
||||
# the token belongs to
|
||||
|
||||
URL='http://127.0.0.1:8000/api/text-widgets'
|
||||
|
||||
curl -X POST \
|
||||
-H "Authorization: Bearer $TOKEN" \
|
||||
-H "Accept: application/json" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{
|
||||
"title": "Yet Another New text widget Title",
|
||||
"content": "This is the content yet again of the new text widget."
|
||||
}' \
|
||||
$URL
|
||||
Loading…
Add table
Add a link
Reference in a new issue