0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2025-12-30 00:12:56 +00:00

reworked to be simpler

This commit is contained in:
Víctor Losada Hernández
2025-07-23 19:52:05 +02:00
parent 0ddca82c86
commit 2bcd317a4c
4 changed files with 8 additions and 78 deletions

View File

@@ -159,15 +159,11 @@ const MetadataEditor = createClass({
handleDeleteAuthor : function(author){
if(!confirm('Are you sure you want to delete this author? They will lose all edit access to this brew.')) return;
request.put(`/api/prune/${this.props.metadata.editId}/${author}`)
.send()
.end((err, res)=>{
if(err) {
this.props.reportError(err);
} else {
window.location.reload();
}
});
if(!this.props.metadata.authors.includes(author)) return;
this.props.onChange({
...this.props.metadata,
authors: this.props.metadata.authors.filter(a => a !== author)
});
},
renderSystems : function(){