You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
'SELECT points + points_l1 + points_l2 as points, change, place FROM user_points_public WHERE address = $1 LIMIT 1',
23
+
constresult=awaitdb.query<{
24
+
points: number;
25
+
change: number;
26
+
place: number;
27
+
}>(
28
+
'SELECT (points + points_l1 + points_l2)::int as points, change::int as change, place::int as place FROM user_points_public WHERE address = $1 LIMIT 1',
23
29
[address],
24
30
);
25
31
row=result.rows[0];
@@ -29,6 +35,8 @@ const getDroplets =
29
35
(easError).message,
30
36
);
31
37
38
+
awaitdb.end();
39
+
32
40
thrownewTRPCError({
33
41
code: 'INTERNAL_SERVER_ERROR',
34
42
message: 'Unexpected error occurred',
@@ -40,6 +48,9 @@ const getDroplets =
40
48
'Address %s not found in public user points table',
41
49
req.input.address,
42
50
);
51
+
52
+
awaitdb.end();
53
+
43
54
thrownewTRPCError({
44
55
code: 'NOT_FOUND',
45
56
message: 'Address not found',
@@ -49,7 +60,7 @@ const getDroplets =
49
60
letcountResult;
50
61
try{
51
62
constcountRes=awaitdb.query(
52
-
'SELECT count(*) as total FROM user_points_public',
63
+
'SELECT count(*)::int as total FROM user_points_public',
0 commit comments