diff options
author | crupest <crupest@outlook.com> | 2020-06-14 16:34:42 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2020-06-14 16:34:42 +0800 |
commit | 53a0483ef11cce939b1df2f288563c888a1d0567 (patch) | |
tree | e998f8cdaf38ccd2c4725b16386f56b7162d7942 /Timeline/Models/Http/ErrorResponse.cs | |
parent | 5d467d950fd4078146709470084cbfae331b8b10 (diff) | |
download | timeline-53a0483ef11cce939b1df2f288563c888a1d0567.tar.gz timeline-53a0483ef11cce939b1df2f288563c888a1d0567.tar.bz2 timeline-53a0483ef11cce939b1df2f288563c888a1d0567.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/Http/ErrorResponse.cs')
-rw-r--r-- | Timeline/Models/Http/ErrorResponse.cs | 10 |
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
{
|