This commit is contained in:
Liang Ding 2023-03-24 15:00:36 +08:00
parent 986166ff8b
commit 13d88644a8
No known key found for this signature in database
GPG key ID: 136F30F901A2231D
4 changed files with 64 additions and 0 deletions

22
API.md
View file

@ -35,6 +35,7 @@
* [Execute SQL query](#Execute-SQL-query)
* [Templates](#Templates)
* [Render a template](#Render-a-template)
* [Render Sprig](#Render-Sprig)
* [File](#File)
* [Get file](#Get-file)
* [Put file](#Put-file)
@ -831,6 +832,27 @@ View API token in <kbd>Settings - About</kbd>, request header: `Authorization: T
}
```
### 渲染 Sprig
* `/api/template/renderSprig`
* Parameters
```json
{
"template": "/daily note/{{now | date \"2006/01\"}}/{{now | date \"2006-01-02\"}}"
}
```
* `template`: template content
* Return value
```json
{
"code": 0,
"msg": "",
"data": "/daily note/2023/03/2023-03-24"
}
```
## File
### Get file