Files
ForgeBucket/internal/api/handlers/prs.go
T
2026-05-06 23:13:06 +02:00

34 lines
896 B
Go

package handlers
import (
"encoding/json"
"net/http"
)
type PRHandler struct{}
func NewPRHandler() *PRHandler {
return &PRHandler{}
}
func (h *PRHandler) List(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Content-Type", "application/json")
json.NewEncoder(w).Encode([]any{})
}
func (h *PRHandler) Create(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Content-Type", "application/json")
w.WriteHeader(http.StatusCreated)
json.NewEncoder(w).Encode(map[string]string{"status": "created"})
}
func (h *PRHandler) Get(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Content-Type", "application/json")
json.NewEncoder(w).Encode(map[string]string{"status": "ok"})
}
func (h *PRHandler) Merge(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Content-Type", "application/json")
json.NewEncoder(w).Encode(map[string]string{"status": "merged"})
}