diff options
author | Alexander_Kabui | 2024-08-07 13:22:24 +0300 |
---|---|---|
committer | Alexander_Kabui | 2024-08-07 13:22:24 +0300 |
commit | 96dc8bf8d85f0a1ea89addbca289c6188bf1dd8b (patch) | |
tree | 5acab3224fb2a9ef14e8cdb757dcfcc515f98b1f /issues/integrate-markdown-editor-to-gn2.gmi | |
parent | 13e8b166bd886eac20f5c29cc39d88857141751a (diff) | |
download | gn-gemtext-96dc8bf8d85f0a1ea89addbca289c6188bf1dd8b.tar.gz |
Update issue: integrate-markdown-editor-to-gn2.
Diffstat (limited to 'issues/integrate-markdown-editor-to-gn2.gmi')
-rw-r--r-- | issues/integrate-markdown-editor-to-gn2.gmi | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/issues/integrate-markdown-editor-to-gn2.gmi b/issues/integrate-markdown-editor-to-gn2.gmi index dac0113..dd4c9b2 100644 --- a/issues/integrate-markdown-editor-to-gn2.gmi +++ b/issues/integrate-markdown-editor-to-gn2.gmi @@ -43,11 +43,13 @@ This is a `GET` request to retrieve file content. Make sure you pass a valid `fi **Edit Request Example:** ```bash -curl -G -d "filepath=test.md" -d "param2=value2" localhost:8091/edit + +curl -G -d "file_path=test.md" localhost:8091/edit ``` In case of a successful response, the expected result is: + ```json { "path": "<file_path>", @@ -73,9 +75,25 @@ In case of an error, the expected response is: localhost:8091/commit ``` + +```bash + +curl -X POST http://127.0.0.1:8091/commit \ +-H 'Content-Type: application/json' \ +-d '{ +"content": "make test commit", +"filename": "test.md", +"email": "test@gmail.com", +"username": "test", +"commit_message": "init commit", +"prev_commit": "7cbfc40d98b49a64e98e7cd562f373053d0325bd" +}' + +``` + It expects the following data in JSON format: -* `content` (the data you want to commit to the file) +* `content` (the data you want to commit to the file, *valid markdown*) * `prev_commit` (required for integrity) * `filename` (file path to the file you are modifying) * `username` (identifier for the user, in our case from auth) |