I'm not quite sure where this is going now.

DI definitely helps, but we're going to have to figure out a pattern for 
this.

It's either going to have to be repository or active record I think
This commit is contained in:
Starbeamrainbowlabs 2019-05-23 22:48:51 +01:00
parent ed256c1e76
commit 0cba7297d4

View file

@ -2,6 +2,7 @@
import { get_instance } from '../Helpers/Database.mjs'; import { get_instance } from '../Helpers/Database.mjs';
import Reading from '../Models/Reading.mjs';
class ReadingRepo { class ReadingRepo {
constructor(in_RSSIRepo) { constructor(in_RSSIRepo) {
@ -20,7 +21,7 @@ class ReadingRepo {
)`); )`);
} }
insert(reading) { add(reading) {
this.insert_query this.insert_query
} }
} }