Implement APIv4 infrastructure (#5191)

* Implement APIv4 infrastructure

* Update parameter requirement functions per feedback
Этот коммит содержится в:
Joram Wilander
2017-01-30 08:30:02 -05:00
коммит произвёл GitHub
родитель 3e2f879b77
Коммит c01d9ad6cf
31 изменённых файлов: 1826 добавлений и 272 удалений

Просмотреть файл

@@ -93,6 +93,18 @@ func AppErrorFromJson(data io.Reader) *AppError {
}
}
func NewAppError(where string, id string, params map[string]interface{}, details string, status int) *AppError {
ap := &AppError{}
ap.Id = id
ap.params = params
ap.Message = id
ap.Where = where
ap.DetailedError = details
ap.StatusCode = status
ap.IsOAuth = false
return ap
}
func NewLocAppError(where string, id string, params map[string]interface{}, details string) *AppError {
ap := &AppError{}
ap.Id = id