🐛 Fix pickup policy picked granted session issue
All checks were successful
release-nightly / build-docker (push) Successful in 3m25s

This commit is contained in:
LittleSheep 2024-01-30 23:32:21 +08:00
parent ecda5bd59b
commit 2daa85daf3
2 changed files with 6 additions and 7 deletions

View File

@ -26,10 +26,9 @@ func preConnect(c *fiber.Ctx) error {
var session models.AuthSession
if err := database.C.Where(&models.AuthSession{
AccountID: user.ID,
ClientID: &client.ID,
LastGrantAt: nil,
}).First(&session).Error; err == nil {
AccountID: user.ID,
ClientID: &client.ID,
}).Where("last_grant_at IS NULL").First(&session).Error; err == nil {
if session.ExpiredAt != nil && session.ExpiredAt.Unix() < time.Now().Unix() {
return c.JSON(fiber.Map{
"client": client,

View File

@ -128,7 +128,7 @@ export default function DashboardPage() {
<div id="data-area" class="mt-5 shadow">
<div class="join join-vertical w-full">
<details class="collapse collapse-plus join-item border border-base-300">
<details class="collapse collapse-plus join-item">
<summary class="collapse-title text-lg font-medium">
Challenges
</summary>
@ -164,7 +164,7 @@ export default function DashboardPage() {
</div>
</details>
<details class="collapse collapse-plus join-item border border-base-300">
<details class="collapse collapse-plus join-item">
<summary class="collapse-title text-lg font-medium">
Sessions
</summary>
@ -203,7 +203,7 @@ export default function DashboardPage() {
</div>
</details>
<details class="collapse collapse-plus join-item border border-base-300">
<details class="collapse collapse-plus join-item">
<summary class="collapse-title text-lg font-medium">
Events
</summary>