Skip to content

Commit

Permalink
Merge pull request #45 from 5jiji/restructure
Browse files Browse the repository at this point in the history
Fix all path errors (i hope)
  • Loading branch information
Naviary2 authored Jul 10, 2024
2 parents d58b83e + 640fe11 commit 9b51956
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/server/routes/createaccount.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const createaccountController = require('../controllers/createaccountController'
const {getRegisterData, checkEmailAssociated, checkUsernameAssociated} = require('../controllers/createaccountController');

router.get('/', (req, res) => {
res.sendFile(path.join(__dirname, '..', 'views', 'createaccount.html'));
res.sendFile(path.join(__dirname, '..', '..', '..', 'dist', 'views', 'createaccount.html'));
})

router.post('/', createaccountController.createNewMember);
Expand Down
2 changes: 1 addition & 1 deletion src/server/routes/member.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const {getMemberData,requestConfirmEmail} = require('../controllers/memberContro


router.get('/:member', (req, res) => {
res.sendFile(path.join(__dirname, '..', 'views', 'member.html'));
res.sendFile(path.join(__dirname, '..', '..', '..', 'dist', 'views', 'member.html'));
});

router.get('/:member/data', getMemberData);
Expand Down
6 changes: 3 additions & 3 deletions src/server/utility/HTMLScriptInjector.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,14 +92,14 @@ function getCachedHTML(htmlFilePath) {
// Inject the scripts we want...

{ // Inject into play.html, our OBFUSCATED htmlscript.js script.
const htmlFilePath = path.join(__dirname, '..', '..', 'client', 'views', 'play.html');
const htmlFilePath = path.join(__dirname, '..', '..', '..', 'dist', 'views', 'play.html');
const jsFilePath = path.join(__dirname, '..', '..', '..', 'dist', 'scripts', 'game', 'htmlscript.js');
prepareAndCacheHTML(htmlFilePath, jsFilePath, '<head>');
}

{ // Inject into dev.html, our htmlscript.js script.
const htmlFilePath = path.join(__dirname, '..', '..', 'client', 'views', 'dev.html');
const jsFilePath = path.join(__dirname, '..', '..', 'client', 'scripts', 'game', 'htmlscript.js');
const htmlFilePath = path.join(__dirname, '..', '..', '..', 'dist', 'views', 'dev.html');
const jsFilePath = path.join(__dirname, '..', '..', '..', 'dist', 'scripts', 'game', 'htmlscript.js');
prepareAndCacheHTML(htmlFilePath, jsFilePath, '<head>');
}

Expand Down

0 comments on commit 9b51956

Please sign in to comment.