0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2026-01-05 18:52:38 +00:00

add comments, update query params, adjust code based on feedback

This commit is contained in:
Charlie Humphreys
2022-05-14 04:17:39 +00:00
parent ff885dc6c2
commit ac905ddf3f
3 changed files with 65 additions and 46 deletions

View File

@@ -200,7 +200,7 @@ const EditPage = createClass({
const brew = this.state.brew;
brew.pageCount = ((brew.renderer=='legacy' ? brew.text.match(/\\page/g) : brew.text.match(/^\\page$/gm)) || []).length + 1;
const params = `${transfer ? `?transfer${this.state.saveGoogle ? 'To' : 'From'}Google=true` : ''}`;
const params = `${transfer ? `?${this.state.saveGoogle ? 'saveToGoogle' : 'removeFromGoogle'}=true` : ''}`;
const res = await request
.put(`/api/update/${brew.editId}${params}`)
.send(brew)