From fad141af7f2a86c8d485d5a2fcc61d10e8bb4472 Mon Sep 17 00:00:00 2001 From: Braeden Sowinski Date: Thu, 6 Oct 2022 08:13:08 -0700 Subject: [PATCH] create DOCUMENTATION file --- DOCUMENTATION | 2 ++ api/handlers/api.go | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 DOCUMENTATION diff --git a/DOCUMENTATION b/DOCUMENTATION new file mode 100644 index 0000000..b773fba --- /dev/null +++ b/DOCUMENTATION @@ -0,0 +1,2 @@ +# SulliCartShare Documentation + diff --git a/api/handlers/api.go b/api/handlers/api.go index f3e518c..f31b4b0 100644 --- a/api/handlers/api.go +++ b/api/handlers/api.go @@ -42,7 +42,7 @@ func (a *App) New() *mux.Router { apiCreate.Handle("/cows/new", api.Middleware(http.HandlerFunc(cow.NewCowHandler))).Methods("POST") // Create new cow apiCreate.Handle("/cows/update/{cow_id}", api.Middleware(http.HandlerFunc(cow.UpdateCowHandler))).Methods("POST") // Update Cow by Object ID apiCreate.Handle("/cows/add/{cow_id}", api.Middleware(http.HandlerFunc(cow.AddDeviceHandler))).Methods("POST") // Add Device to cow device list - apiCreate.Handle("/cows/getChildDevices", api.Middleware(http.HandlerFunc(device.GetChildDevices))).Methods("POST") // Get Child Devices with a given cow obj + apiCreate.Handle("/cows/getChildDevices", api.Middleware(http.HandlerFunc(device.GetChildDevices))).Methods("POST") // Returns a list of devices from a given Cow obj apiCreate.Handle("/device/{device_id}", api.Middleware(http.HandlerFunc(device.DeviceByIDHandler))).Methods("GET") // By Object ID not Device Name apiCreate.Handle("/devices", api.Middleware(http.HandlerFunc(device.DeviceHandler))).Methods("GET") // Returns all devices