mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-19 23:33:13 +09:00
Rename mod hash field to sha1
The Factorio Mod Portal uses and provides SHA1 hashes of mods, so it makes sense to align the ModPack and ModInfo structures to sha1 by renaming the genericly named hash property to sha1.
This commit is contained in:
1 parent
bddde30be4
commit
9b4ca86650
9 files changed
+21
-22
No files matched your search
@@ -28,7 +28,7 @@ const ModSettingsJsonSchema = {
|
||||
* @typedef {object} module:lib/data/ModPack~ModRecord
|
||||
* @property {string} name - name of the mod.
|
||||
* @property {string} version - version of the mod.
|
||||
* @property {string} hash - hash of the zip file.
|
||||
* @property {string} sha1 - SHA1 hash of the zip file.
|
||||
*/
|
||||
const ModRecordJsonSchema = {
|
||||
type: "object",
|
||||
@@ -37,7 +37,7 @@ const ModRecordJsonSchema = {
|
||||
properties: {
|
||||
"name": { type: "string" },
|
||||
"version": { type: "string" },
|
||||
"hash": { type: "string" },
|
||||
"sha1": { type: "string" },
|
||||
},
|
||||
};
|
||||
|
||||
@@ -176,7 +176,7 @@ class ModPack {
|
||||
if (json.mods && !includeHash) {
|
||||
json.mods = json.mods.map(m => {
|
||||
m = { ...m };
|
||||
delete m.hash;
|
||||
delete m.sha1;
|
||||
return m;
|
||||
});
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user