forked from jriou/coller
fix: convert id to int64
Snowflake identifiers are integers, not strings. BREAKING CHANGE: notes that are not using snowflake identifiers will not be compatible anymore. Signed-off-by: Julien Riou <julien@riou.xyz>
This commit is contained in:
parent
b5701b5a4d
commit
1fcde736a8
6 changed files with 9 additions and 9 deletions
|
@ -36,7 +36,7 @@ type NotePayload struct {
|
|||
}
|
||||
|
||||
type NoteResponse struct {
|
||||
ID string `json:"id"`
|
||||
ID int64 `json:"id"`
|
||||
Message string `json:"message,omitempty"`
|
||||
Error string `json:"error,omitempty"`
|
||||
}
|
||||
|
@ -246,7 +246,7 @@ func handleMain() int {
|
|||
|
||||
logger.Debug("finding note location")
|
||||
var location string
|
||||
noteURL := *url + "/" + jsonBody.ID
|
||||
noteURL := *url + "/" + fmt.Sprintf("%d", jsonBody.ID)
|
||||
if *copier {
|
||||
location = "copier"
|
||||
if *encryptionKey != "" {
|
||||
|
|
|
@ -64,7 +64,7 @@ Body (JSON):
|
|||
* **language** (string): language of the note (must be supported by the server)
|
||||
|
||||
Response (JSON):
|
||||
* **id** (string): ID of the note
|
||||
* **id** (int): ID of the note
|
||||
|
||||
|
||||
### GET /api/note/\<id\>/\<encryptionKey\>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue