Skip to content

Commit

Permalink
Add modLoader field to update
Browse files Browse the repository at this point in the history
  • Loading branch information
henkelmax committed Jun 18, 2021
1 parent 1bc2ef1 commit 080f919
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 2 deletions.
7 changes: 7 additions & 0 deletions frontend/src/views/Update.vue
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,13 @@
></v-text-field>
</v-col>

<v-col cols="12" md="12">
<v-radio-group row v-model="update.modLoader" :mandatory="true">
<v-radio label="Forge" value="forge"></v-radio>
<v-radio label="Fabric" value="fabric"></v-radio>
</v-radio-group>
</v-col>

<v-col cols="12" md="12">
<v-text-field
v-model="update.version"
Expand Down
6 changes: 5 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,9 @@ const updateSchema = Joi.object().keys({
gameVersion: Joi.string()
.min(1)
.required(),
modLoader: Joi.string()
.valid('forge', 'fabric')
.default('forge'),
version: Joi.string()
.min(1)
.required(),
Expand Down Expand Up @@ -652,7 +655,8 @@ const amountSchema = Joi.number()
.aggregate([
{
$match: {
mod: mod._id
mod: mod._id,
modLoader: 'forge'
}
},
{
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "update-server",
"version": "1.0.21",
"version": "1.1.0",
"main": "index.js",
"author": "Max Henkel",
"scripts": {
Expand Down
1 change: 1 addition & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ This can be used directly for the [Forge Update Checker](https://mcforge.readthe
{
"publishDate": "2019-10-10T14:48:00", // The publishing date (used to order the updates).
"gameVersion": "1.14.4", // The game version.
"modLoader": "forge", // The mod loader.
"version": "1.0.0", // The mod version.
"updateMessages": ["Updated to 1.14.4", "Added readme.md"], // The update messages (Changelog etc.).
"releaseType": "release", // The release type [alpha, beta, release]. Default value: "release".
Expand Down

0 comments on commit 080f919

Please sign in to comment.