长度限制

This commit is contained in:
milimoe 2026-01-06 02:04:03 +08:00
parent a3aefa93a6
commit 8530cd422a
Signed by: milimoe
GPG Key ID: 9554D37E4B8991D0

View File

@ -21,6 +21,7 @@ namespace Milimoe.FunGame.WebAPI.Controllers
int year = dto.Year; int year = dto.Year;
int month = dto.Month; int month = dto.Month;
string content = dto.Content; string content = dto.Content;
if (content.Length > 40) content = content[..40];
string result = ""; string result = "";
if (year == 0) year = DateTime.Today.Year; if (year == 0) year = DateTime.Today.Year;
if (month == 0) month = DateTime.Today.Month; if (month == 0) month = DateTime.Today.Month;
@ -75,6 +76,7 @@ namespace Milimoe.FunGame.WebAPI.Controllers
return result; return result;
} }
[AllowAnonymous]
[HttpGet("sclist")] [HttpGet("sclist")]
public string SCList(long id, long group, int year = 0, int month = 0, bool reverse = false) public string SCList(long id, long group, int year = 0, int month = 0, bool reverse = false)
{ {