bug修复

This commit is contained in:
jianzhichu
2025-11-30 21:33:18 +08:00
parent e42a004765
commit 50149a280b
57 changed files with 766 additions and 317 deletions
+28 -1
View File
@@ -2,6 +2,7 @@
using dy.net.dto;
using dy.net.model;
using dy.net.service;
using dy.sync.lib;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
@@ -20,12 +21,14 @@ namespace dy.net.Controllers
private readonly DouyinCommonService commonService;
private readonly DouyinQuartzJobService quartzJobService;
private readonly IHttpClientFactory httpClientFactory;
public ConfigController(DouyinCookieService dyCookieService, DouyinCommonService commonService,DouyinQuartzJobService quartzJobService)
public ConfigController(DouyinCookieService dyCookieService, DouyinCommonService commonService,DouyinQuartzJobService quartzJobService,IHttpClientFactory httpClientFactory)
{
this.dyCookieService = dyCookieService;
this.commonService = commonService;
this.quartzJobService = quartzJobService;
this.httpClientFactory = httpClientFactory;
}
@@ -163,5 +166,29 @@ namespace dy.net.Controllers
quartzJobService.InitOrReStartAllJobs(config.Cron.ToString());
//避免前端等待
}
/// <summary>
/// 镜像标签
/// </summary>
/// <returns></returns>
[HttpGet("mytag")]
public async Task<IActionResult> GetMyTag()
{
return Ok(new { code = 0, data =Appsettings.Get("tagName") });
}
[HttpGet("checktag")]
public async Task<IActionResult> CheckTag()
{
var data =await DouyinHttpHelper.GetTenImage(Appsettings.Get("tagName"));
if (data.IsSuccessStatusCode)
{
var content = await data.Content.ReadAsStringAsync();
return Ok(content);
}
else
{
return BadRequest(new { code = -1, message = "请求失败" });
}
}
}
}