Commit database handler changes.
This commit is contained in:
parent
9bd37dfed4
commit
a2d3a45095
1 changed files with 6 additions and 0 deletions
|
@ -142,6 +142,12 @@ module.exports = {
|
|||
db.prepare("INSERT INTO activity_objects (object, type, local, uri_id, owner, created_at) VALUES (?, ?, ?, ?, ?, ?)").run(object, type, local, uri_id, owner, created_at);
|
||||
},
|
||||
|
||||
activity: new Proxy({}, {
|
||||
set: (target, key, value) => {
|
||||
db.prepare("INSERT INTO activity_objects (object, type, local, uri_id, owner, created_at) VALUES (?, ?, ?, ?, ?, ?)").run(value.object, value.type, value.local.toString(), key, value.owner, value.created_at);
|
||||
},
|
||||
}),
|
||||
|
||||
getLastStatus: (owner) => {
|
||||
return db.prepare("SELECT created_at FROM activity_objects WHERE type = 'https://www.w3.org/ns/activitystreams#Note' AND owner = ? ORDER BY created_at DESC").get(owner);
|
||||
},
|
||||
|
|
Loading…
Add table
Reference in a new issue