mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-12 08:40:11 +00:00
Refactor pk;switch move, specify UTC everywhere
This commit is contained in:
parent
97b972e38a
commit
e8d1c5bf90
5 changed files with 19 additions and 18 deletions
|
|
@ -18,6 +18,9 @@ class Switch(namedtuple("Switch", ["id", "system", "timestamp", "members"])):
|
|||
async def delete(self, conn):
|
||||
await db.delete_switch(conn, self.id)
|
||||
|
||||
async def move(self, conn, new_timestamp):
|
||||
await db.move_switch(conn, self.system, self.id, new_timestamp)
|
||||
|
||||
async def to_json(self, conn):
|
||||
return {
|
||||
"timestamp": self.timestamp.isoformat(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue