@nodeart/firebase-connector
Advanced tools
Comparing version 2.1.44 to 2.1.45
@@ -37,3 +37,3 @@ { | ||
}, | ||
"version": "2.1.44" | ||
"version": "2.1.45" | ||
} |
@@ -567,2 +567,16 @@ import { Http, Response } from '@angular/http'; | ||
} | ||
getSeoText(url: string, indexBlock: number) : Observable<any>{ | ||
return Observable.create( observer => { | ||
firebase.database().ref('seo-text').orderByChild('url').equalTo(url).on('value', data => { | ||
if(data.val() && data.val() !== null){ | ||
Object.keys(data.val()).map( key => { | ||
observer.next(data.val()[key]['blocks'][indexBlock]); | ||
}); | ||
} else { | ||
observer.next(null); | ||
} | ||
}); | ||
}); | ||
} | ||
} |
43782
1045