Adds session creation code in Auth.js (#4574)
This commit is contained in:
@@ -511,7 +511,7 @@ class DatabaseController {
|
||||
addRelation(key: string, fromClassName: string, fromId: string, toId: string) {
|
||||
const doc = {
|
||||
relatedId: toId,
|
||||
owningId : fromId
|
||||
owningId: fromId
|
||||
};
|
||||
return this.adapter.upsertOneObject(`_Join:${key}:${fromClassName}`, relationSchema, doc, doc);
|
||||
}
|
||||
@@ -658,7 +658,7 @@ class DatabaseController {
|
||||
|
||||
// Returns a promise for a list of owning ids given some related ids.
|
||||
// className here is the owning className.
|
||||
owningIds(className: string, key: string, relatedIds: string): Promise<string[]> {
|
||||
owningIds(className: string, key: string, relatedIds: string[]): Promise<string[]> {
|
||||
return this.adapter.find(joinTableName(className, key), relationSchema, { relatedId: { '$in': relatedIds } }, {})
|
||||
.then(results => results.map(result => result.owningId));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user