This commit is contained in:
cxfksword 2021-05-07 12:09:40 +08:00 committed by GitHub
parent 71b617e754
commit e07a873bc2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -53,7 +53,7 @@ namespace Inotify
{
OnAuthenticationFailed = context =>
{
var payload = JsonConvert.SerializeObject(new { message = "ÈÏ֤ʧ°Ü", code = 403 });
var payload = JsonConvert.SerializeObject(new { message = "认证失败", code = 403 });
context.Response.ContentType = "application/json";
context.Response.StatusCode = StatusCodes.Status200OK;
context.Response.WriteAsync(payload);
@ -62,7 +62,7 @@ namespace Inotify
},
OnForbidden = context =>
{
var payload = JsonConvert.SerializeObject(new { message = "δ¾­ÊÚȨ", code = 405 });
var payload = JsonConvert.SerializeObject(new { message = "未经授权", code = 405 });
context.Response.ContentType = "application/json";
context.Response.StatusCode = StatusCodes.Status200OK;
context.Response.WriteAsync(payload);
@ -121,7 +121,7 @@ namespace Inotify
{
var groups = match.Groups;
rewriteContext.HttpContext.Request.Path = @"/api/send";
rewriteContext.HttpContext.Request.QueryString = new QueryString($"?token={groups[2]}&title={groups[3]}&date={groups[4]}");
rewriteContext.HttpContext.Request.QueryString = new QueryString($"?token={groups[2]}&title={groups[3]}&data={groups[4]}");
}
else
{
@ -173,4 +173,4 @@ namespace Inotify
});
}
}
}
}