diff options
author | crupest <crupest@outlook.com> | 2020-10-27 15:39:09 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2020-10-27 15:39:09 +0800 |
commit | 0c4caaebe2480e77918d5d7df234f0edaeab74ba (patch) | |
tree | 6205c8ffd13a00aa2e6045413577bcf81d899650 /Timeline/Models/Http/ErrorResponse.cs | |
parent | fe1ca658ca5afbe7cd74303bb9b75f1e735c0762 (diff) | |
download | timeline-0c4caaebe2480e77918d5d7df234f0edaeab74ba.tar.gz timeline-0c4caaebe2480e77918d5d7df234f0edaeab74ba.tar.bz2 timeline-0c4caaebe2480e77918d5d7df234f0edaeab74ba.zip |
refactor(back): Refactor error codes code generator.
Diffstat (limited to 'Timeline/Models/Http/ErrorResponse.cs')
-rw-r--r-- | Timeline/Models/Http/ErrorResponse.cs | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/Timeline/Models/Http/ErrorResponse.cs b/Timeline/Models/Http/ErrorResponse.cs index 7ba536f9..ac86481f 100644 --- a/Timeline/Models/Http/ErrorResponse.cs +++ b/Timeline/Models/Http/ErrorResponse.cs @@ -1,15 +1,11 @@ -
-using static Timeline.Resources.Messages;
+using static Timeline.Resources.Messages;
namespace Timeline.Models.Http
{
-
public static class ErrorResponse
{
-
public static class Common
{
-
public static CommonResponse InvalidModel(params object?[] formatArgs)
{
return new CommonResponse(ErrorCodes.Common.InvalidModel, string.Format(Common_InvalidModel, formatArgs));
@@ -42,7 +38,6 @@ namespace Timeline.Models.Http public static class Header
{
-
public static CommonResponse IfNonMatch_BadFormat(params object?[] formatArgs)
{
return new CommonResponse(ErrorCodes.Common.Header.IfNonMatch_BadFormat, string.Format(Common_Header_IfNonMatch_BadFormat, formatArgs));
@@ -57,7 +52,6 @@ namespace Timeline.Models.Http public static class Content
{
-
public static CommonResponse TooBig(params object?[] formatArgs)
{
return new CommonResponse(ErrorCodes.Common.Content.TooBig, string.Format(Common_Content_TooBig, formatArgs));
@@ -74,7 +68,6 @@ namespace Timeline.Models.Http public static class UserCommon
{
-
public static CommonResponse NotExist(params object?[] formatArgs)
{
return new CommonResponse(ErrorCodes.UserCommon.NotExist, string.Format(UserCommon_NotExist, formatArgs));
@@ -89,7 +82,6 @@ namespace Timeline.Models.Http public static class TokenController
{
-
public static CommonResponse Create_BadCredential(params object?[] formatArgs)
{
return new CommonResponse(ErrorCodes.TokenController.Create_BadCredential, string.Format(TokenController_Create_BadCredential, formatArgs));
@@ -144,7 +136,6 @@ namespace Timeline.Models.Http public static class UserController
{
-
public static CommonResponse UsernameConflict(params object?[] formatArgs)
{
return new CommonResponse(ErrorCodes.UserController.UsernameConflict, string.Format(UserController_UsernameConflict, formatArgs));
@@ -169,7 +160,6 @@ namespace Timeline.Models.Http public static class UserAvatar
{
-
public static CommonResponse BadFormat_CantDecode(params object?[] formatArgs)
{
return new CommonResponse(ErrorCodes.UserAvatar.BadFormat_CantDecode, string.Format(UserAvatar_BadFormat_CantDecode, formatArgs));
@@ -204,7 +194,6 @@ namespace Timeline.Models.Http public static class TimelineController
{
-
public static CommonResponse NameConflict(params object?[] formatArgs)
{
return new CommonResponse(ErrorCodes.TimelineController.NameConflict, string.Format(TimelineController_NameConflict, formatArgs));
|