Skip to content

Commit 2aa1a9a

Browse files
authored
Fix login due to change in domain name + update to new planning service (#35)
1 parent e18f3ed commit 2aa1a9a

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "insa_planning",
3-
"version": "2.1.1",
3+
"version": "2.1.2",
44
"description": "A typescript discord bot",
55
"main": "dist/server.js",
66
"scripts": {

src/Constants.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export abstract class Constants {
1616
'--single-process',
1717
'--disable-gpu'
1818
]
19-
}
19+
};
2020

2121
// DISCORD
2222
static readonly DISCORD_MAX_NUMBER_OPTIONS_SELECT_MENU = 25;
@@ -37,15 +37,15 @@ export abstract class Constants {
3737
static readonly CONFIGURATIONS: Configuration[] = [
3838
{
3939
year: 3,
40-
planning: "https://servif-cocktail.insa-lyon.fr/EdT/3IFA.php",
41-
channel: "1143301054625226813",
40+
planning: "https://servif.insa-lyon.fr/EdT/3IFA.php",
41+
channel: "1255444229610541086",
4242
name: "3IFA",
4343
cron: { }
4444
},
4545
{
4646
year: 4,
47-
planning: "https://servif-cocktail.insa-lyon.fr/EdT/4IFA.php",
48-
channel: "885433068511428648",
47+
planning: "https://servif.insa-lyon.fr/EdT/4IFA.php",
48+
channel: "1143301054625226813",
4949
name: "4IFA",
5050
cron: { }
5151
}

src/services/PlanningService.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ export class PlanningService<IsReady extends boolean = false> {
208208
}
209209

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

0 commit comments

Comments
 (0)