| 182 | } |
| 183 | |
| 184 | func LoadOperationUser(c *gin.Context) string { |
| 185 | sessionUser, ok := c.Get(psessionUtils.GinContextSessionUserKey) |
| 186 | if ok { |
| 187 | psession, ok := sessionUser.(psessionUtils.SessionUser) |
| 188 | if ok { |
| 189 | return psession.Name |
| 190 | } |
| 191 | } |
| 192 | apiUsername, ok := c.Get("API_AUTH_USERNAME") |
| 193 | if !ok { |
| 194 | return "" |
| 195 | } |
| 196 | username, ok := apiUsername.(string) |
| 197 | if !ok { |
| 198 | return "" |
| 199 | } |
| 200 | return username |
| 201 | } |
| 202 | |
| 203 | func fillOperationDetail(operationDic *operationJson, formatMap map[string]interface{}) { |
| 204 | for key, value := range formatMap { |