added obsidian note api

This commit is contained in:
2026-01-12 15:46:01 +00:00
parent 77a7c3250e
commit 99ace613ce
4 changed files with 92 additions and 1 deletions

View File

@@ -0,0 +1,19 @@
package handlers
import (
"net/http"
"github.com/gin-gonic/gin"
)
func (store *Store) GetNote(ctx *gin.Context) {
path := ctx.Param("path")
note, err := store.Notes.GetNote(path)
if err != nil {
ctx.JSON(http.StatusNotFound, gin.H{"error": err.Error()})
return
}
ctx.JSON(http.StatusOK, note)
}

View File

@@ -12,4 +12,5 @@ type Store struct {
SpotifyAuth *spotifyauth.Authenticator
SpotifyClient *spotify.Client
Auth *services.Auth
Notes *services.Notes
}