mirror of
https://github.com/rommapp/romm.git
synced 2026-12-05 23:44:11 +01:00
add playtime tracking via emujs
This commit is contained in:
21
frontend/src/services/api/play-session.ts
Normal file
21
frontend/src/services/api/play-session.ts
Normal file
@@ -0,0 +1,21 @@
|
||||
import api from "@/services/api";
|
||||
|
||||
async function ingestPlaySessions({
|
||||
deviceId = null,
|
||||
sessions,
|
||||
}: {
|
||||
deviceId?: string | null;
|
||||
sessions: {
|
||||
rom_id: number;
|
||||
start_time: string;
|
||||
end_time: string;
|
||||
duration_ms: number;
|
||||
}[];
|
||||
}) {
|
||||
return api.post("/play-sessions", {
|
||||
device_id: deviceId,
|
||||
sessions,
|
||||
});
|
||||
}
|
||||
|
||||
export default { ingestPlaySessions };
|
||||
Reference in New Issue
Block a user