Skip to content

Commit

Permalink
works apart from me being dumb
Browse files Browse the repository at this point in the history
  • Loading branch information
Jemoka committed Jan 19, 2022
1 parent 3cf09bb commit b56d06b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/Storage/Backends/RethinkDBBackend.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ class ReThinkCollection extends Collection {
}

async add(payload:object) {
let p:Promise<DataExchangeResult> = new Promise((res,rej) => r.db(this.db).table(this.userid).insert({key:this.primarykey}).run(this.working_connection, (_, result) => {res({
let p:Promise<DataExchangeResult> = new Promise((res,rej) => r.db(this.db).table(this.userid).insert({key:this.primarykey, ...payload}).run(this.working_connection, (_, result) => {res({
identifier: result["generated_keys"][0],
payload: payload,
response: result
Expand Down
4 changes: 2 additions & 2 deletions tests/scratchpad.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ import { Task, Project, Perspective } from "../src/CondutionEngine.ts"
ReThinkProvider.create("localhost", 28015, "admin", "").then((p:ReThinkProvider) => {
let m = new ReferenceManager([p]);

let context = new Context(m, "testuserid");
let context = new Context(m, "admin");
context.start();

Task.create(context, "hewoo").then((t:any) => console.log(t));
Task.create(context, "hewoo").then((t:any) => t.name = "hewo");
});


Expand Down

0 comments on commit b56d06b

Please sign in to comment.