Skip to content

Commit

Permalink
Fix login due to change in domain name + update to new planning servi…
Browse files Browse the repository at this point in the history
…ce (#35)
  • Loading branch information
Apokalypt authored Jun 26, 2024
1 parent e18f3ed commit 2aa1a9a
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "insa_planning",
"version": "2.1.1",
"version": "2.1.2",
"description": "A typescript discord bot",
"main": "dist/server.js",
"scripts": {
Expand Down
10 changes: 5 additions & 5 deletions src/Constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export abstract class Constants {
'--single-process',
'--disable-gpu'
]
}
};

// DISCORD
static readonly DISCORD_MAX_NUMBER_OPTIONS_SELECT_MENU = 25;
Expand All @@ -37,15 +37,15 @@ export abstract class Constants {
static readonly CONFIGURATIONS: Configuration[] = [
{
year: 3,
planning: "https://servif-cocktail.insa-lyon.fr/EdT/3IFA.php",
channel: "1143301054625226813",
planning: "https://servif.insa-lyon.fr/EdT/3IFA.php",
channel: "1255444229610541086",
name: "3IFA",
cron: { }
},
{
year: 4,
planning: "https://servif-cocktail.insa-lyon.fr/EdT/4IFA.php",
channel: "885433068511428648",
planning: "https://servif.insa-lyon.fr/EdT/4IFA.php",
channel: "1143301054625226813",
name: "4IFA",
cron: { }
}
Expand Down
2 changes: 1 addition & 1 deletion src/services/PlanningService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ export class PlanningService<IsReady extends boolean = false> {
}

// Check if the server redirect us to the login page
if (page.url().startsWith('https://login')) {
if (!page.url().startsWith(url)) {
await page.type('#username', Constants.LOGIN);
await page.type('#password', Constants.PASSWORD);

Expand Down

0 comments on commit 2aa1a9a

Please sign in to comment.