MCPcopy Create free account
hub / github.com/dedsec1121fk/DedSec / api_ping

Function api_ping

Scripts/ButSystem.py:13715–13726  ·  view source on GitHub ↗

api_ping. Route handler or application helper. This docstring was expanded to make future maintenance easier. Returns: Varies.

()

Source from the content-addressed store, hash-verified

13713 cur = conn.cursor()
13714 cur.execute(
13715 "INSERT INTO dm_files(dm_id, filename, mime, stored_path, size, created_at) VALUES(?,?,?,?,?,?)",
13716 (dm_id, "gif.gif", "image/gif", "PENDING", 0, now_z())
13717 )
13718 fid = cur.lastrowid
13719 stored_path = os.path.join(DM_FILES_DIR, f"dm_file_{fid}.bin")
13720 conn.commit()
13721 conn.close()
13722
13723 # Download with a cap to avoid abuse.
13724 max_bytes = CHAT_MAX_BYTES # 33 MB
13725 size = 0
13726 mime = "image/gif"
13727 filename = "gif.gif"
13728
13729 req = urllib.request.Request(

Callers

nothing calls this directly

Calls 2

mark_onlineFunction · 0.70
current_userFunction · 0.70

Tested by

no test coverage detected