Mercurial > gemma
comparison controllers/user.go @ 314:adceb47920fb
Cosmetics. Little less structure bloat.
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Wed, 01 Aug 2018 18:35:30 +0200 |
parents | 74559e12a59f |
children | a7b2db8b3d18 |
comparison
equal
deleted
inserted
replaced
313:10b93a8ee057 | 314:adceb47920fb |
---|---|
130 | 130 |
131 jr = JSONResult{ | 131 jr = JSONResult{ |
132 Code: http.StatusCreated, | 132 Code: http.StatusCreated, |
133 Result: struct { | 133 Result: struct { |
134 Result string `json:"result"` | 134 Result string `json:"result"` |
135 }{ | 135 }{"success"}, |
136 Result: "success", | |
137 }, | |
138 } | 136 } |
139 return | 137 return |
140 } | 138 } |
141 | 139 |
142 func createUser( | 140 func createUser( |
174 | 172 |
175 jr = JSONResult{ | 173 jr = JSONResult{ |
176 Code: http.StatusCreated, | 174 Code: http.StatusCreated, |
177 Result: struct { | 175 Result: struct { |
178 Result string `json:"result"` | 176 Result string `json:"result"` |
179 }{ | 177 }{"success"}, |
180 Result: "success", | |
181 }, | |
182 } | 178 } |
183 return | 179 return |
184 } | 180 } |
185 | 181 |
186 func listUsers( | 182 func listUsers( |
214 } | 210 } |
215 | 211 |
216 jr = JSONResult{ | 212 jr = JSONResult{ |
217 Result: struct { | 213 Result: struct { |
218 Users []*User `json:"users"` | 214 Users []*User `json:"users"` |
219 }{ | 215 }{users}, |
220 Users: users, | |
221 }, | |
222 } | 216 } |
223 return | 217 return |
224 } | 218 } |
225 | 219 |
226 func listUser( | 220 func listUser( |