Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev to main 0.2.6 #11

Merged
merged 4 commits into from
Mar 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
- **0.2.0**: Réécriture en **typescript**
- **1.0.0**: Quand le module sera stable

## 0.2.6

- Ajout de la propriété `_accessToken` dans le fichier Session

## 0.2.5

- Ajout de la fonction `getFileBase64()` pour récupérer un fichier en base64
Expand Down
4 changes: 2 additions & 2 deletions CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@ keywords:
- ecoledirecte
- papillon
license: GPL-3.0
version: 0.2.5
date-released: '2024-03-10'
version: 0.2.6
date-released: '2024-03-15'
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@papillonapp/ed-core",
"version": "0.2.5",
"version": "0.2.6",
"description": "API EcoleDirecte pour PapillonApp (c)",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
Expand Down
2 changes: 2 additions & 0 deletions src/auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ class Auth {

const account = data.accounts[0];

this.session._accessToken = account.accessToken;

this.session.modules = account.modules;
this.session.settings = account.parametresIndividuels;
this.session.school = this.#getEtabInfo(account);
Expand Down
2 changes: 2 additions & 0 deletions src/session.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import {GetDownloads} from "~/fetch/getDownloads";
class Session {

_token: undefined | string;
_accessToken: undefined | string;
isLoggedIn: boolean;
settings?: accountParameters;
student: account | BlankAccount;
Expand Down Expand Up @@ -54,6 +55,7 @@ class Session {

constructor() {
this._token = undefined; // Le token
this._accessToken = undefined;
this.isLoggedIn = false;
this.student = { id: 0 }; // Utilisateur initialisé vide

Expand Down
Loading