mirror of
https://github.com/AmruthPillai/Reactive-Resume.git
synced 2025-11-14 08:42:08 +10:00
Firebase stub: added support for filtering of resumes by user
This commit is contained in:
@ -241,11 +241,23 @@ class Reference {
|
||||
return databaseData;
|
||||
}
|
||||
|
||||
let data = null;
|
||||
if (
|
||||
this.#path === Reference.resumesPath ||
|
||||
this.#path === Reference.usersPath
|
||||
) {
|
||||
return this.#path in databaseData ? databaseData[this.#path] : null;
|
||||
data = this.#path in databaseData ? databaseData[this.#path] : null;
|
||||
|
||||
if (data && this.#orderByChildPath && this.#equalToValue) {
|
||||
return Object.fromEntries(
|
||||
Object.entries(data).filter(
|
||||
([key, value]) =>
|
||||
value[this.#orderByChildPath] === this.#equalToValue,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
if (
|
||||
|
||||
Reference in New Issue
Block a user