MCPcopy Create free account
hub / github.com/TaskingAI/TaskingAI / logout_admin

Function logout_admin

backend/app/database_ops/auth/admin/logout.py:7–23  ·  view source on GitHub ↗
(admin: Admin)

Source from the content-addressed store, hash-verified

5
6
7async def logout_admin(admin: Admin):
8 # 1. remove token
9 async with postgres_pool.get_db_connection() as conn:
10 await conn.execute(
11 """
12 UPDATE app_admin SET token = NULL, updated_timestamp = $1
13 WHERE admin_id = $2
14 """,
15 current_timestamp_int_milliseconds(),
16 admin.admin_id,
17 )
18 admin.token = None
19
20 # 2. remove from redis
21 await admin_ops.redis.pop(admin)
22
23 return admin

Callers

nothing calls this directly

Calls 4

get_db_connectionMethod · 0.80
executeMethod · 0.45
popMethod · 0.45

Tested by

no test coverage detected