Skip to content

Commit

Permalink
Merge pull request #11 from PapillonApp/dev
Browse files Browse the repository at this point in the history
Dev to main 0.2.6
  • Loading branch information
camarm-dev authored Mar 15, 2024
2 parents 1715011 + 22d66f1 commit b41083c
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 3 deletions.
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

0 comments on commit b41083c

Please sign in to comment.