Skip to content

Commit

Permalink
Remove debug code
Browse files Browse the repository at this point in the history
  • Loading branch information
a2br committed Dec 24, 2020
1 parent 719c083 commit b26acf2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 15 deletions.
7 changes: 2 additions & 5 deletions lib/functions/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,13 +124,10 @@ export async function getMessages(

//! TYPE GUARDS

export function isFailure(edRes: any): edRes is _failureRes {
export function isFailure(data: any): data is _failureRes {
try {
return (
edRes.token === "" ||
edRes.code !== 200 ||
!edRes.data ||
!edRes.data.accounts
!data.token && data.code !== 200 && (!data.data || !data.data.accounts)
);
} catch {
return true;
Expand Down
10 changes: 0 additions & 10 deletions lib/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,3 @@ import * as accounts from "./account_types";
import { Session } from "./Session";

export { Session, accounts };

(async () => {
const session = new Session("EDELEVE", "a");
const account = await session.login();
if (account.type !== "student") return;

console.log(
(await account.getHomework("2021-01-14"))[2].contenuDeSeance.contenu
);
})();

0 comments on commit b26acf2

Please sign in to comment.