azure 测试

This commit is contained in:
杨毅 2024-11-03 01:10:52 +08:00
parent 6fd84ecba9
commit 84123c9c22

View File

@ -30,7 +30,7 @@ namespace asg_form.Controllers
{
logger.Warn(rootobject.EventType);
Random random = new Random();
string[] strings = { "upload", "--copyright 1", "--dolby 0", "--hires 0", $"--title {rootobject.EventData.Title}-直播回放{random.Next(1,99)}", "--tag 第五人格,第五人格ASG赛事", @$"{AppDomain.CurrentDomain.BaseDirectory}video\{rootobject.EventData.RelativePath}" };
string[] strings = { "upload", "--copyright 1", "--dolby 0", "--hires 0", $"--title {rootobject.EventData.Title}-直播回放{random.Next(1, 99)}", "--tag 第五人格,第五人格ASG赛事", @$"{AppDomain.CurrentDomain.BaseDirectory}video\{rootobject.EventData.RelativePath}" };
StartProcess("biliup.exe", strings);
@ -42,16 +42,31 @@ namespace asg_form.Controllers
}
}
public class azurereq
{
public Message message { get; set; }
public DateTime createdDate { get; set; }
}
public class Message
{
public string text { get; set; }
}
[Route("api/v1/Codepush/")]
[HttpPost]
public async Task<object> Codepush([FromBody]dynamic date1)
public async Task<object> Codepush([FromBody] azurereq date)
{
try {
dynamic date = JsonConvert.DeserializeObject(Convert.ToString(date1));
var message = new MessageBuilder().Text($"后端推送了新的代码库\r\n详细信息{date.message.text}").Build();
try
{
var message = new MessageBuilder().Text($"后端推送了新的代码库\r\n详细信息{date.message.text}").Build();
await runbot.runbotr.SendMessageAsync(MessageEnvironment.Channel, "931217544", null, message, "931217544");
@ -67,12 +82,11 @@ namespace asg_form.Controllers
[Route("api/v1/issueadd/")]
[HttpPost]
public async Task<object> issueadd([FromBody] dynamic date1)
public async Task<object> issueadd([FromBody] azurereq date)
{
try
{
dynamic date = JsonConvert.DeserializeObject(Convert.ToString(date1));
var message = new MessageBuilder().Text($"后端有新bug被提交请及时解决\r\n详细信息{date.message.text}").Build();
@ -82,7 +96,7 @@ namespace asg_form.Controllers
}
catch
{
var message = new MessageBuilder().Text($"后端有新bug被提交请及时解决\r\n详细信息{date1.ToJsonString}").Build();
var message = new MessageBuilder().Text($"后端有新bug被提交请及时解决\r\n详细信息{date}").Build();
await runbot.runbotr.SendMessageAsync(MessageEnvironment.Channel, "931217544", null, message, "931217544");