List measurements
Also, fixed typo in router.
This commit is contained in:
parent
87ac729c98
commit
d462935682
9 changed files with 153 additions and 1 deletions
|
@ -60,6 +60,7 @@ func API() *mux.Router {
|
|||
m.Path("/unit_types/{Id:.+}").Methods("DELETE").Name(DeleteUnitType)
|
||||
|
||||
// Measurements
|
||||
m.Path("/measurements/").Methods("GET").Name(Measurements)
|
||||
m.Path("/measurements/").Methods("POST").Name(CreateMeasurement)
|
||||
m.Path("/measurements/{Id:.+}").Methods("GET").Name(Measurement)
|
||||
|
||||
|
|
|
@ -47,6 +47,7 @@ const (
|
|||
UpdateUnitType = "unit_type:update"
|
||||
DeleteUnitType = "unit_type:delete"
|
||||
|
||||
Measurement = "measurement:get"
|
||||
Measurement = "measurements:get"
|
||||
CreateMeasurement = "measurements:create"
|
||||
Measurements = "measurements:list"
|
||||
)
|
||||
|
|
Reference in a new issue