Skip to content

Commit

Permalink
Add deletion function for builds
Browse files Browse the repository at this point in the history
  • Loading branch information
ZandercraftGames committed Sep 29, 2023
1 parent b6376fb commit 7b94f6a
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions database/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,3 +71,14 @@ exports.getModpackBuild = (mSlug, bVersion) => {
return undefined
})
}

exports.deleteBuild = (mId) => {
return exports.Build.deleteOne({ name: mId }).exec().then(() => {

Check notice on line 76 in database/build.js

View workflow job for this annotation

GitHub Actions / Qodana for JS

Signature mismatch

Invalid number of arguments, expected 1
// Successfully deleted this build
return true
}).catch((reason) => {
// Failed to delete the build
debug(`ERROR (DB): Failed to delete build '${mId}' because of: ${reason}`)
return false
})
}

0 comments on commit 7b94f6a

Please sign in to comment.