|
@@ -19,7 +19,7 @@ using TEAMModelOS.SDK.PngQuant;
|
|
|
|
|
|
namespace TEAMModelOS.Controllers.Core
|
|
|
{
|
|
|
- [Route("Core")]
|
|
|
+ [Route("core")]
|
|
|
[ApiController]
|
|
|
public class CoreController : ControllerBase
|
|
|
{
|
|
@@ -33,7 +33,13 @@ namespace TEAMModelOS.Controllers.Core
|
|
|
_dingDing = dingDing;
|
|
|
_option = option?.Value;
|
|
|
}
|
|
|
-
|
|
|
+ [HttpPost("apply-school")]
|
|
|
+ [RequestSizeLimit(100_000_000)] //最大100m左右
|
|
|
+ public async Task<IActionResult> ApplySchool(ApplySchool request) {
|
|
|
+ await _dingDing.SendBotMsg($"有新学校申请。\n申请站点:{_option.Location}\n申请学校:{request.name}\n所在国家\\地区:{request.area}\n申请人:{request.tmdname}({request.tmdid})\n联系电话:{request.cellphone}\n备注:{request.content}", GroupNames.AI智慧學校申請通知群);
|
|
|
+ return Ok();
|
|
|
+
|
|
|
+ }
|
|
|
[HttpPost("system-info")]
|
|
|
[RequestSizeLimit(100_000_000)] //最大100m左右
|
|
|
public IActionResult SystemInfo(JsonElement request) {
|
|
@@ -150,4 +156,16 @@ namespace TEAMModelOS.Controllers.Core
|
|
|
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
+ public record ApplySchool {
|
|
|
+ public string name { get; set; }
|
|
|
+ public string site { get; set; }
|
|
|
+ public string area { get; set; }
|
|
|
+ public string tmdname { get; set; }
|
|
|
+ public string tmdid { get; set; }
|
|
|
+ public string cellphone { get; set; }
|
|
|
+ public string content { get; set; }
|
|
|
+
|
|
|
+ }
|
|
|
}
|