26 lines
603 B
Go
26 lines
603 B
Go
package handlers
|
|
|
|
import (
|
|
"net/http"
|
|
|
|
"github.com/gorilla/mux"
|
|
)
|
|
|
|
func CreateGroupHandler(w http.ResponseWriter, r *http.Request) {
|
|
w.WriteHeader(http.StatusCreated)
|
|
w.Write([]byte("Group Created"))
|
|
}
|
|
|
|
func RemoveGroupHandler(w http.ResponseWriter, r *http.Request) {
|
|
vars := mux.Vars(r)
|
|
groupID := vars["groupId"]
|
|
w.WriteHeader(http.StatusOK)
|
|
w.Write([]byte("Group ID " + groupID + " Removed"))
|
|
}
|
|
|
|
func GetGroupHandler(w http.ResponseWriter, r *http.Request) {
|
|
vars := mux.Vars(r)
|
|
groupID := vars["groupId"]
|
|
w.WriteHeader(http.StatusOK)
|
|
w.Write([]byte("Displaying Group ID: " + groupID))
|
|
} |