fix: getway bad api spec
This commit is contained in:
parent
66c6ea4c23
commit
e1b6c0770d
|
@ -16,11 +16,12 @@
|
||||||
|
|
||||||
-define(BAD_REQUEST, 'BAD_REQUEST').
|
-define(BAD_REQUEST, 'BAD_REQUEST').
|
||||||
-define(NOT_FOUND, 'NOT_FOUND').
|
-define(NOT_FOUND, 'NOT_FOUND').
|
||||||
|
-define(RESOURCE_NOT_FOUND, 'RESOURCE_NOT_FOUND').
|
||||||
-define(INTERNAL_ERROR, 'INTERNAL_SERVER_ERROR').
|
-define(INTERNAL_ERROR, 'INTERNAL_SERVER_ERROR').
|
||||||
|
|
||||||
-define(STANDARD_RESP(R),
|
-define(STANDARD_RESP(R),
|
||||||
R#{ 400 => emqx_dashboard_swagger:error_codes(
|
R#{ 400 => emqx_dashboard_swagger:error_codes(
|
||||||
[?BAD_REQUEST], <<"Bad request">>)
|
[?BAD_REQUEST], <<"Bad request">>)
|
||||||
, 404 => emqx_dashboard_swagger:error_codes(
|
, 404 => emqx_dashboard_swagger:error_codes(
|
||||||
[?NOT_FOUND], <<"Not Found">>)
|
[?NOT_FOUND, ?RESOURCE_NOT_FOUND], <<"Not Found">>)
|
||||||
}).
|
}).
|
||||||
|
|
Loading…
Reference in New Issue