Skip to content

Commit b766de4

Browse files
feat: enable grants logging in tg
1 parent f1433d2 commit b766de4

4 files changed

Lines changed: 9 additions & 7 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"@base-ui/react": "^1.3.0",
1717
"@better-auth/passkey": "^1.5.5",
1818
"@hookform/resolvers": "^3.9.1",
19-
"@polinetwork/backend": "^0.15.14",
19+
"@polinetwork/backend": "^0.15.15",
2020
"@radix-ui/react-dialog": "^1.1.15",
2121
"@t3-oss/env-nextjs": "^0.13.10",
2222
"@tanstack/react-query": "^5.90.19",

pnpm-lock.yaml

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/app/dashboard/(active)/telegram/grants/delete-grant.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export function DeleteGrant({ userId }: { userId: number }) {
3232

3333
async function interrupt() {
3434
if (!removerId) return toast.error("Invalid session, try to reload the page")
35-
const { error } = await mutateAsync({ userId, interruptedById: removerId })
35+
const { error } = await mutateAsync({ userId, interruptedById: removerId, sendTgLog: true })
3636

3737
if (error === "NOT_FOUND") toast.info("The grant was expired or already interrupted")
3838
else if (error === "UNAUTHORIZED") toast.error("You don't have enought permission")

src/app/dashboard/(active)/telegram/grants/new-grant.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ export function NewGrant() {
6060
setUser(null)
6161
setStartDate(undefined)
6262
setEndDate(undefined)
63+
setReason("")
6364
qc.invalidateQueries(trpc.tg.grants.getOngoing.queryOptions())
6465
if (user) qc.invalidateQueries(trpc.tg.grants.checkUser.queryOptions({ userId: user.id }))
6566
}
@@ -88,6 +89,7 @@ export function NewGrant() {
8889
since: startDate,
8990
until: endDate,
9091
reason: reason || undefined,
92+
sendTgLog: true,
9193
})
9294

9395
if (res.error === "UNAUTHORIZED") toast.error("You don't have permission to create grants.")

0 commit comments

Comments
 (0)