beamsocial 0.1.1 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/index.d.ts CHANGED
@@ -8,7 +8,7 @@ export declare class Client {
8
8
  constructor(baseURL: string, token?: string);
9
9
  login(username: string, password: string): Promise<Session | null>;
10
10
  refresh(token?: string): Promise<void>;
11
- me(): Promise<Session>;
11
+ me(): Promise<Session | null>;
12
12
  update_settings(settings: ProfileSettings): Promise<void>;
13
13
  /*************************************/
14
14
  getUser(name: string): Promise<User>;
package/lib/index.js CHANGED
@@ -56,7 +56,7 @@ export class Client {
56
56
  return session;
57
57
  }
58
58
  else if (res.status === 401) {
59
- throw new Error('Not logged in');
59
+ return null;
60
60
  }
61
61
  else {
62
62
  throw new Error('Error fetching session');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "beamsocial",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "type": "module",
5
5
  "description": "API-wrapper pour Beam",
6
6
  "main": "index.js",