Skip to content
Snippets Groups Projects
Commit a870ad24 authored by michael.minelli's avatar michael.minelli
Browse files

Model => Remove param in toJsonObject function

parent 105be403
No related branches found
No related tags found
No related merge requests found
...@@ -44,7 +44,7 @@ class Session { ...@@ -44,7 +44,7 @@ class Session {
} }
private async getResponse(code: number, data: any, descriptionOverride?: string): Promise<any> { private async getResponse(code: number, data: any, descriptionOverride?: string): Promise<any> {
const profileJson = await this.profile.toJsonObject(false); const profileJson = await this.profile.toJsonObject();
let reasonPhrase = ''; let reasonPhrase = '';
......
...@@ -13,14 +13,14 @@ class Enonce extends Model { ...@@ -13,14 +13,14 @@ class Enonce extends Model {
enonceGitlabLastInfo: string = ''; enonceGitlabLastInfo: string = '';
enonceGitlabLastInfoTs: number = null; enonceGitlabLastInfoTs: number = null;
public async toJsonObject(lightVersion: boolean): Promise<Object> { public async toJsonObject(): Promise<Object> {
const result = { const result = {
'id' : this.enonceID, 'id' : this.enonceID,
'name' : this.enonceName, 'name' : this.enonceName,
'gitlabId' : this.enonceGitlabId, 'gitlabId' : this.enonceGitlabId,
'gitlabLink' : this.enonceGitlabLink, 'gitlabLink' : this.enonceGitlabLink,
'gitlabCreationInfo': this.enonceGitlabCreationInfo, 'gitlabCreationInfo': JSON.parse(this.enonceGitlabCreationInfo),
'gitlabLastInfo' : this.enonceGitlabLastInfo, 'gitlabLastInfo' : JSON.parse(this.enonceGitlabLastInfo),
'gitlabLastInfoTs' : this.enonceGitlabLastInfoTs 'gitlabLastInfoTs' : this.enonceGitlabLastInfoTs
}; };
......
...@@ -8,7 +8,7 @@ class EnonceStaff extends Model { ...@@ -8,7 +8,7 @@ class EnonceStaff extends Model {
enonceID: number = null; enonceID: number = null;
userID: number = null; userID: number = null;
public async toJsonObject(lightVersion: boolean): Promise<Object> { public async toJsonObject(): Promise<Object> {
const result = { const result = {
'enonceID': this.enonceID, 'enonceID': this.enonceID,
'userID' : this.userID 'userID' : this.userID
......
...@@ -15,7 +15,7 @@ abstract class Model extends Object { ...@@ -15,7 +15,7 @@ abstract class Model extends Object {
return result; return result;
} }
public abstract toJsonObject(lightVersion: boolean): Promise<Object> public abstract toJsonObject(): Promise<Object>
} }
......
...@@ -23,7 +23,7 @@ class User extends Model { ...@@ -23,7 +23,7 @@ class User extends Model {
currentSession: Session = null; currentSession: Session = null;
public async toJsonObject(lightVersion: boolean): Promise<Object> { public async toJsonObject(): Promise<Object> {
const result = { const result = {
'id' : this.userID, 'id' : this.userID,
'firstName' : this.userFirstName, 'firstName' : this.userFirstName,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment