Skip to content

Commit

Permalink
Merge pull request #12 from teleportx/dev
Browse files Browse the repository at this point in the history
fixes
  • Loading branch information
teleportx authored Jul 27, 2024
2 parents a30c718 + bd427a5 commit 565d8dd
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
5 changes: 3 additions & 2 deletions export_info_service/main.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
import sys

sys.path.append('..')

from datetime import datetime

from aiogram.types import BufferedInputFile
from tortoise.expressions import Q

from db.ToiletSessions import SretSession

sys.path.append('..')

import asyncio
import json

Expand Down
3 changes: 0 additions & 3 deletions frontend_service/.gitignore

This file was deleted.

4 changes: 2 additions & 2 deletions frontend_service/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ async fn get_analytics(db_pool: PgPool) -> Option<AnalyticsTemplate> {
.await
.ok()?;
let leaderboard1: Vec<LeaderboardRecord> = sqlx::query_as!(LeaderboardRecord, "SELECT u.name, COUNT(*) count FROM sretsession as s JOIN \"user\" u ON u.uid = s.user_id GROUP BY u.name ORDER BY COUNT(*) DESC LIMIT 10").fetch_all(&db_pool).await.ok()?;
let leaderboard2: Vec<LeaderboardRecord> = sqlx::query_as!(LeaderboardRecord, "SELECT u.name, COUNT(*) count FROM sretsession as s JOIN \"user\" u on u.uid = s.user_id WHERE s.sret_type IN (1, 2) GROUP BY u.name ORDER BY COUNT(*) DESC LIMIT 10").fetch_all(&db_pool).await.ok()?;
let leaderboard3: Vec<LeaderboardRecord> = sqlx::query_as!(LeaderboardRecord, "SELECT u.name, COUNT(*) count FROM sretsession as s JOIN \"user\" u on u.uid = s.user_id WHERE s.sret_type = 3 GROUP BY u.name ORDER BY COUNT(*) DESC LIMIT 10").fetch_all(&db_pool).await.ok()?;
let leaderboard2: Vec<LeaderboardRecord> = sqlx::query_as!(LeaderboardRecord, "SELECT u.name, COUNT(*) count FROM sretsession as s JOIN \"user\" u on u.uid = s.user_id WHERE s.sret_type = 3 GROUP BY u.name ORDER BY COUNT(*) DESC LIMIT 10").fetch_all(&db_pool).await.ok()?;
let leaderboard3: Vec<LeaderboardRecord> = sqlx::query_as!(LeaderboardRecord, "SELECT u.name, COUNT(*) count FROM sretsession as s JOIN \"user\" u on u.uid = s.user_id WHERE s.sret_type IN (1, 2) GROUP BY u.name ORDER BY COUNT(*) DESC LIMIT 10").fetch_all(&db_pool).await.ok()?;
Some(AnalyticsTemplate {
type1_total: shit
.iter()
Expand Down

0 comments on commit 565d8dd

Please sign in to comment.