fix: convert id to int64
All checks were successful
/ pre-commit (push) Successful in 1m33s

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:
Julien Riou 2025-09-27 10:05:58 +02:00
commit 1fcde736a8
Signed by: jriou
GPG key ID: 9A099EDA51316854
6 changed files with 9 additions and 9 deletions

View file

@ -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 != "" {

View file

@ -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\>