aboutsummaryrefslogtreecommitdiff
path: root/Timeline/Models
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2020-06-14 16:34:42 +0800
committercrupest <crupest@outlook.com>2020-06-14 16:34:42 +0800
commit5e02abc95cc8419b378917d7053d63092046b2cf (patch)
treeace855832f1c4e88e9fed7b2b2c95fb5e06424f3 /Timeline/Models
parent4c6f4c214edc5b574951d4cc8f3654bc30efa8da (diff)
downloadtimeline-5e02abc95cc8419b378917d7053d63092046b2cf.tar.gz
timeline-5e02abc95cc8419b378917d7053d63092046b2cf.tar.bz2
timeline-5e02abc95cc8419b378917d7053d63092046b2cf.zip
Many many bugs fix.
1. Add a way to test front end with mock page. 2. Unknown api returns 400 but not frontend page. 3. Fix a big bug that cause all data loss in database migration.
Diffstat (limited to 'Timeline/Models')
-rw-r--r--Timeline/Models/Http/ErrorResponse.cs10
1 files changed, 10 insertions, 0 deletions
diff --git a/Timeline/Models/Http/ErrorResponse.cs b/Timeline/Models/Http/ErrorResponse.cs
index bb9c44df..9a4d190a 100644
--- a/Timeline/Models/Http/ErrorResponse.cs
+++ b/Timeline/Models/Http/ErrorResponse.cs
@@ -30,6 +30,16 @@ namespace Timeline.Models.Http
return new CommonResponse(ErrorCodes.Common.Forbid, string.Format(message, formatArgs));
}
+ public static CommonResponse UnknownEndpoint(params object?[] formatArgs)
+ {
+ return new CommonResponse(ErrorCodes.Common.UnknownEndpoint, string.Format(Common_UnknownEndpoint, formatArgs));
+ }
+
+ public static CommonResponse CustomMessage_UnknownEndpoint(string message, params object?[] formatArgs)
+ {
+ return new CommonResponse(ErrorCodes.Common.UnknownEndpoint, string.Format(message, formatArgs));
+ }
+
public static class Header
{