mirror of
https://github.com/Zandercraft/TechnicFlux.git
synced 2026-10-31 04:59:20 +00:00
Add deletion function for builds
This commit is contained in:
@@ -71,3 +71,14 @@ exports.getModpackBuild = (mSlug, bVersion) => {
|
|||||||
return undefined
|
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