aboutsummaryrefslogtreecommitdiff
path: root/Timeline/Models/Http/ErrorResponse.cs
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2020-02-03 17:50:17 +0800
committercrupest <crupest@outlook.com>2020-02-03 17:50:17 +0800
commit4b2569368073bbd556bbe71bd51807de91f814cb (patch)
tree9f9747d30d15abf8389527039db542c961135b1f /Timeline/Models/Http/ErrorResponse.cs
parent10985f0a26010988d26777d5a6d985b4fbc0a776 (diff)
downloadtimeline-4b2569368073bbd556bbe71bd51807de91f814cb.tar.gz
timeline-4b2569368073bbd556bbe71bd51807de91f814cb.tar.bz2
timeline-4b2569368073bbd556bbe71bd51807de91f814cb.zip
Add TimelineController.
Diffstat (limited to 'Timeline/Models/Http/ErrorResponse.cs')
-rw-r--r--Timeline/Models/Http/ErrorResponse.cs26
1 files changed, 23 insertions, 3 deletions
diff --git a/Timeline/Models/Http/ErrorResponse.cs b/Timeline/Models/Http/ErrorResponse.cs
index a20b5386..0d23fe59 100644
--- a/Timeline/Models/Http/ErrorResponse.cs
+++ b/Timeline/Models/Http/ErrorResponse.cs
@@ -242,17 +242,37 @@ namespace Timeline.Models.Http
}
- public static class TimelineController
+ public static class TimelineCommon
{
+ public static CommonResponse NameConflict(params object?[] formatArgs)
+ {
+ return new CommonResponse(ErrorCodes.TimelineCommon.NameConflict, string.Format(TimelineCommon_NameConflict, formatArgs));
+ }
+
+ public static CommonResponse CustomMessage_NameConflict(string message, params object?[] formatArgs)
+ {
+ return new CommonResponse(ErrorCodes.TimelineCommon.NameConflict, string.Format(message, formatArgs));
+ }
+
+ public static CommonResponse NotExist(params object?[] formatArgs)
+ {
+ return new CommonResponse(ErrorCodes.TimelineCommon.NotExist, string.Format(TimelineCommon_NotExist, formatArgs));
+ }
+
+ public static CommonResponse CustomMessage_NotExist(string message, params object?[] formatArgs)
+ {
+ return new CommonResponse(ErrorCodes.TimelineCommon.NotExist, string.Format(message, formatArgs));
+ }
+
public static CommonResponse MemberPut_NotExist(params object?[] formatArgs)
{
- return new CommonResponse(ErrorCodes.TimelineController.MemberPut_NotExist, string.Format(TimelineController_MemberPut_NotExist, formatArgs));
+ return new CommonResponse(ErrorCodes.TimelineCommon.MemberPut_NotExist, string.Format(TimelineCommon_MemberPut_NotExist, formatArgs));
}
public static CommonResponse CustomMessage_MemberPut_NotExist(string message, params object?[] formatArgs)
{
- return new CommonResponse(ErrorCodes.TimelineController.MemberPut_NotExist, string.Format(message, formatArgs));
+ return new CommonResponse(ErrorCodes.TimelineCommon.MemberPut_NotExist, string.Format(message, formatArgs));
}
}