[+] Create alternative constructor for posting

This commit is contained in:
Hykilpikonna
2020-04-27 02:19:33 -04:00
parent 9adc78f287
commit 8e54749e2e
+10
View File
@@ -111,4 +111,14 @@ export class CourseInfoRating
this.ratings = json.ratings;
this.comment = json.comment;
}
/**
* Create new for posting to the server
* @param id_ci
*/
public static createNew(id_ci: number)
{
return new CourseInfoRating({id_ci: id_ci, id_user: -1, userFullName: null,
anonymous: false, ratings: [0,0,0,0,0], comment: ''})
}
}