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 {
}
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 = '';
......
......@@ -13,14 +13,14 @@ class Enonce extends Model {
enonceGitlabLastInfo: string = '';
enonceGitlabLastInfoTs: number = null;
public async toJsonObject(lightVersion: boolean): Promise<Object> {
public async toJsonObject(): Promise<Object> {
const result = {
'id' : this.enonceID,
'name' : this.enonceName,
'gitlabId' : this.enonceGitlabId,
'gitlabLink' : this.enonceGitlabLink,
'gitlabCreationInfo': this.enonceGitlabCreationInfo,
'gitlabLastInfo' : this.enonceGitlabLastInfo,
'gitlabCreationInfo': JSON.parse(this.enonceGitlabCreationInfo),
'gitlabLastInfo' : JSON.parse(this.enonceGitlabLastInfo),
'gitlabLastInfoTs' : this.enonceGitlabLastInfoTs
};
......
......@@ -8,7 +8,7 @@ class EnonceStaff extends Model {
enonceID: number = null;
userID: number = null;
public async toJsonObject(lightVersion: boolean): Promise<Object> {
public async toJsonObject(): Promise<Object> {
const result = {
'enonceID': this.enonceID,
'userID' : this.userID
......
......@@ -15,7 +15,7 @@ abstract class Model extends Object {
return result;
}
public abstract toJsonObject(lightVersion: boolean): Promise<Object>
public abstract toJsonObject(): Promise<Object>
}
......
......@@ -23,7 +23,7 @@ class User extends Model {
currentSession: Session = null;
public async toJsonObject(lightVersion: boolean): Promise<Object> {
public async toJsonObject(): Promise<Object> {
const result = {
'id' : this.userID,
'firstName' : this.userFirstName,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment