0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2025-12-25 01:02:47 +00:00
Commit Graph

167 Commits

Author SHA1 Message Date
Trevor Buckner
ccbeca2cad Move process.chdir up so it occurs before config.js is ever called.
app.js should be required before config to make sure process.cwd is updated first
2022-01-30 00:13:35 -05:00
Trevor Buckner
d7aa4afa60 process.chdir in app.js.
Everything works, no need for path.resolve. All tests pass.
2022-01-29 23:53:30 -05:00
Trevor Buckner
e4c2ce6a8c Merge branch 'private/asachkov/refactor-config-initialization' of https://github.com/AlexeySachkov/homebrewery into pr/1981 2022-01-29 21:36:10 -05:00
Trevor Buckner
de115c5113 Merge branch 'master' into pr/1981 2022-01-29 21:34:38 -05:00
Alexey Sachkov
4e0ab4b393 Adjust paths to config files 2022-01-28 21:40:40 +03:00
Alexey Sachkov
588bcebc87 [NFC] Outline config creation into a separate module
This is done in order to have config creation rules
unified in one place to avoid modifying them multiple times
if they change.

We already had 3 duplicated pieces of code initializing the
config and there will be more config uses in future tests.

This resolves #1960
2022-01-23 20:06:52 +03:00
Alexey Sachkov
9c57450330 [NFC] Explicitly define variables before using them
Fixed two errors which were discovered by trying to run the code in "strict" mode,
which is automatically done by Jest testing framework.
2022-01-22 00:18:13 +03:00
Alexey Sachkov
0dfe18cd18 Fix liner errors 2022-01-11 23:24:50 +03:00
Alexey Sachkov
8895b44be9 [NFC] Outline an express app into a separate module
This is done in order to be able to re-use that app in API unit tests later
2022-01-11 22:24:23 +03:00
Trevor Buckner
e315c29620 Merge pull request #1931 from AlexeySachkov/private/asachkov/outline-db-connection
[NFC] Outline database connection into a separate file
2022-01-10 13:55:55 -05:00
Alexey Sachkov
e84cd4fe8b Apply review comments
Switched from raw promises to async/await.
Outlined error handling function to reduce amount of nested code.
Added comment about the new file intent.
2022-01-10 19:25:36 +03:00
G.Ambatte
e48e8cd05b Increase pageSize to 1000 2022-01-05 13:17:56 +13:00
Alexey Sachkov
6e04535eff [NFC] Outline database connection into a separate file 2021-12-29 19:04:17 +03:00
Trevor Buckner
a8f5f71b32 Send 500 error if Google doesn't send an error
Fixes crash where error did not contain the expected `response` field from Google.
2021-12-09 13:57:43 -05:00
Charlie Humphreys
6a73136176 Update object parsing to use _.pick 2021-12-01 19:20:16 -06:00
Charlie Humphreys
db3980a716 Add yaml require back in 2021-11-30 23:32:16 -06:00
Charlie Humphreys
25c36425be Update code based on feedback 2021-11-30 23:05:08 -06:00
Charlie Humphreys
ef433bbbe2 Update brew content merging functionality and add it to downloads/page source views
#1838
2021-11-23 23:53:02 -06:00
Charlie Humphreys
f40b4b2f30 Update brew text merge and split functions to include metadata
#1838
2021-11-18 23:23:05 -06:00
G.Ambatte
2948a9ffc3 Update listGoogleBrews to ensure pageCount and views are integers 2021-11-03 21:39:20 +13:00
G.Ambatte
fbf1bbbf99 Add Page Count to the Google brew update function 2021-09-11 09:41:23 +12:00
Trevor Buckner
1e8c285eef Just renaming/rearranging variables 2021-08-26 23:09:56 -04:00
G.Ambatte
4971c40e23 Remove undesired properties from brews prior to updating
Clean up tab/spacing in `googleActions.js`
2021-08-26 18:45:13 +12:00
Trevor Buckner
9673a9a0f6 Merge pull request #1542 from G-Ambatte/fixGoogleModifiedTime-#1506
Set modifiedTime during view count update of Google brews
2021-08-24 23:55:57 -04:00
Trevor Buckner
e9939e7a0d Fix alignment 2021-08-24 23:55:03 -04:00
Trevor Buckner
519d102a6e Throw errors in listGoogleBrews() and getGoogleFolder() 2021-08-20 01:45:50 -04:00
G.Ambatte
cb8c3a016a BETTER property alignment in googleActions 2021-08-18 16:25:08 +12:00
G.Ambatte
7a081e1147 Property alignment in googleActions.js 2021-08-18 16:20:27 +12:00
G.Ambatte
2c6c148da8 Push pageCount to NewPage and EditPage 2021-08-17 19:30:19 +12:00
G.Ambatte
42da4b4c43 Add a page count to User page 2021-08-17 19:30:17 +12:00
G.Ambatte
cfb98986cd Push pageCount to NewPage and EditPage 2021-08-17 19:30:01 +12:00
G.Ambatte
0fd7921a50 Lint fix. 2021-08-17 19:30:01 +12:00
G.Ambatte
e0e86dff7c Update server/googleActions.js
Co-authored-by: Trevor Buckner <calculuschild@gmail.com>
2021-08-17 19:29:25 +12:00
G.Ambatte
7e30fb19d4 Update server/googleActions.js
Co-authored-by: Trevor Buckner <calculuschild@gmail.com>
2021-08-17 19:29:25 +12:00
G.Ambatte
df07e0401a Add support for Google Brews. 2021-08-17 19:27:56 +12:00
G.Ambatte
a908c5f5d5 Add a page count to User page 2021-08-17 19:27:54 +12:00
Trevor Buckner
0075b0836a Popup error when gDrive credentials are expired on both /edit and /new 2021-08-11 15:36:57 -04:00
G.Ambatte
779426dbb1 Set modifiedTime during view count update 2021-08-10 21:43:41 +12:00
G.Ambatte
2c954c398c Add renderer metadata to Google Drive file properties 2021-08-09 19:21:25 +12:00
G.Ambatte
a1e78f1d17 Add createdTime to G-Drive fields to retrieve
Add Moment to UserPage sorting
2021-08-07 14:47:25 +12:00
Trevor Buckner
e07bb1b3c2 Don't save style tab if user never put anything in it 2021-06-24 23:29:01 -04:00
G.Ambatte
e2280197b9 Unwinding hanging new line accidentally left after removing other code changes. 2021-06-21 19:49:35 +12:00
G.Ambatte
a74916d593 Removed CSS splitting from homebrew.api.js and back to newPage.jsx. 2021-06-21 19:46:54 +12:00
G.Ambatte
ad0e4a2099 Lint fixes. 2021-06-21 19:39:30 +12:00
G.Ambatte
2613d43f3c Shift CSS processing from newPage.jsx/save to homebrew.api.js/newBrew, as this function is only called when saving new Brews. 2021-06-21 19:38:02 +12:00
Trevor Buckner
d61fda9cff Fix regression with saving. 2021-06-20 16:05:36 -04:00
Trevor Buckner
70832be810 Fix brews failing to sanitize on user page 2021-06-20 13:53:26 -04:00
Trevor Buckner
9d80f21ae7 Fix empty Google Brews crashing user page 2021-06-11 13:46:03 -04:00
Trevor Buckner
f80d5e6b52 Fix sanitizing brews in user page, hide own G brews on other profiles 2021-06-10 14:22:12 -04:00
Trevor Buckner
e67fadef02 Separate "style" and "metadata" panels 2021-06-05 15:58:31 -04:00