feat: Manifest接口增加hasScript字段,mediabot据此判断用Groovy还是JSON
This commit is contained in:
@@ -64,11 +64,13 @@ public class ManifestController {
|
|||||||
if (latest != null) {
|
if (latest != null) {
|
||||||
entry.put("latestVersion", latest.getVersion());
|
entry.put("latestVersion", latest.getVersion());
|
||||||
entry.put("configHash", latest.getConfigHash());
|
entry.put("configHash", latest.getConfigHash());
|
||||||
|
entry.put("hasScript", latest.getScriptStoragePath() != null && !latest.getScriptStoragePath().isBlank());
|
||||||
entry.put("updatedAt", latest.getCreatedAt());
|
entry.put("updatedAt", latest.getCreatedAt());
|
||||||
}
|
}
|
||||||
// 参与 ETag 计算
|
// 参与 ETag 计算
|
||||||
etagBuilder.append(site.getSiteId())
|
etagBuilder.append(site.getSiteId())
|
||||||
.append(latest != null ? latest.getConfigHash() : "none")
|
.append(latest != null ? latest.getConfigHash() : "none")
|
||||||
|
.append(latest != null ? latest.getScriptStoragePath() : "none")
|
||||||
.append(";");
|
.append(";");
|
||||||
|
|
||||||
return entry;
|
return entry;
|
||||||
|
|||||||
Reference in New Issue
Block a user