Recently, I made the decision to expand my iOS application to also function as a web app. Although the implementation seems to be working, I am unsure if it is done correctly. I would appreciate it if someone could confirm if the implementation is correct.
Below is the function from my LicenceService:
get retriveLicences():Licence[] {
const licences: Licence[] = [];
this.afDatabase.list(this.basePath).valueChanges().subscribe((snapshot) => {
snapshot.forEach(element => {
const licenceObject = <any>element
licences.push(
new Licence(
licenceObject.name,
licenceObject.logoUrl,
licenceObject.maxUsers,
licenceObject.currentUserCount,
licenceObject.startDate,
licenceObject.endDate
)
);
});
});
return licences
}