From 53a0483ef11cce939b1df2f288563c888a1d0567 Mon Sep 17 00:00:00 2001 From: crupest Date: Sun, 14 Jun 2020 16:34:42 +0800 Subject: 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. --- Timeline/Models/Http/ErrorResponse.cs | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'Timeline/Models/Http/ErrorResponse.cs') 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 { -- cgit v1.2.3