mirror of
https://github.com/Zandercraft/TechnicFlux.git
synced 2026-10-25 03:59:21 +00:00
Add deletion function for builds
This commit is contained in:
@@ -71,3 +71,14 @@ exports.getModpackBuild = (mSlug, bVersion) => {
|
||||
return undefined
|
||||
})
|
||||
}
|
||||
|
||||
exports.deleteBuild = (mId) => {
|
||||
return exports.Build.deleteOne({ name: mId }).exec().then(() => {
|
||||
// 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
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user