17 lines
314 B
Go
17 lines
314 B
Go
package api
|
|
|
|
import (
|
|
"net/http"
|
|
|
|
"jukebox_maker/internal/dialog"
|
|
)
|
|
|
|
func (s *Server) handlePickFolder(w http.ResponseWriter, r *http.Request) {
|
|
path, err := dialog.PickFolder()
|
|
if err != nil {
|
|
jsonErr(w, http.StatusUnprocessableEntity, err.Error())
|
|
return
|
|
}
|
|
jsonOK(w, map[string]string{"path": path})
|
|
}
|