refactor: 文件路径按pending/approved区分,去掉版本号
- submit: configs/{siteId}/pending/{hash}.json
- approve: 文件移到 configs/{siteId}/approved/{hash}.json
This commit is contained in:
@@ -57,7 +57,7 @@ public class ConfigServiceImpl implements ConfigService {
|
||||
public SiteConfig submitConfig(String siteId, String version, String configJson,
|
||||
String schemaVersion, Long submitterId) {
|
||||
String configHash = HmacUtil.sha256(configJson);
|
||||
String storagePath = String.format("configs/%s/%s/%s.json", siteId, version, configHash.substring(0, 8));
|
||||
String storagePath = String.format("configs/%s/pending/%s.json", siteId, configHash.substring(0, 8));
|
||||
|
||||
// 相同 hash 的提交 → 真正重复,跳过
|
||||
SiteConfig sameHash = siteConfigMapper.selectOne(
|
||||
|
||||
Reference in New Issue
Block a user