2023-12-29 18:36:10 +01:00
|
|
|
* sort-of-pastebin
|
|
|
|
|
|
|
|
A little project in Flask to store inputs encrypted and delete once someone looks at it.
|
|
|
|
|
|
|
|
** Origin
|
|
|
|
|
|
|
|
This project was inspired by Snappass and was previously licensed under MIT.
|
|
|
|
|
|
|
|
- https://github.com/pinterest/snappass
|
|
|
|
|
2024-04-03 18:37:25 +02:00
|
|
|
** Tests :verb:
|
2023-12-29 18:36:10 +01:00
|
|
|
|
2024-04-19 19:40:50 +02:00
|
|
|
# To run this tests you need to have Emacs and the package [[https://github.com/federicotdn/verb][verb]] installed.
|
|
|
|
# Then you can press the following key combination on the headings {C-c C-r C-r}.
|
|
|
|
|
|
|
|
template http://localhost:8000
|
2023-12-29 18:36:10 +01:00
|
|
|
Accept: application/json
|
|
|
|
Content-Type: application/json
|
|
|
|
|
2024-04-19 19:40:50 +02:00
|
|
|
*** Store secret
|
|
|
|
POST /
|
|
|
|
|
2023-12-29 18:36:10 +01:00
|
|
|
{
|
|
|
|
"ttl": 604800,
|
|
|
|
"password": "Foo"
|
|
|
|
}
|
|
|
|
|
2024-04-03 18:37:25 +02:00
|
|
|
*** Retrieve secret
|
2024-04-19 19:40:50 +02:00
|
|
|
POST /get-secret
|
2023-12-29 18:36:10 +01:00
|
|
|
|
|
|
|
{
|
2024-04-19 19:40:50 +02:00
|
|
|
"key": "{{(verb-json-get (oref verb-last body) "key")}}"
|
2023-12-29 18:36:10 +01:00
|
|
|
}
|