Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: always set ticket expires at as it can't be null (#588)
Fixes nhost/nhost#3035 ### **PR Type** Bug fix ___ ### **Description** - Updated `TicketExpiresAt` field in multiple test cases to use `sql.TimestampTz(time.Now())` ensuring it is always set to a non-null value. - Modified `ticketExpiresAt` initialization in `SignupUserWithouthSession` method to ensure it is always set to a non-null value. ___ ### **Changes walkthrough** 📝 <table><thead><tr><th></th><th align="left">Relevant files</th></tr></thead><tbody><tr><td><strong>Bug fix</strong></td><td><table> <tr> <td> <details> <summary><strong>post_signin_idtoken_test.go</strong><dd><code>Set non-null `TicketExpiresAt` in test cases</code> </dd></summary> <hr> go/controller/post_signin_idtoken_test.go <li>Updated <code>TicketExpiresAt</code> field to use <code>sql.TimestampTz(time.Now())</code> <br>instead of <code>pgtype.Timestamptz{}</code>.<br> <li> Ensured <code>TicketExpiresAt</code> is always set to a non-null value in test <br>cases.<br> </details> </td> <td><a href="https://github.com/nhost/hasura-auth/pull/588/files#diff-d849cc9b72340eb39d633b2446f3223cb202e09cabdef07b5ce512f15fc129f2">+4/-4</a> </td> </tr> <tr> <td> <details> <summary><strong>workflows.go</strong><dd><code>Ensure `ticketExpiresAt` is non-null during user signup</code> </dd></summary> <hr> go/controller/workflows.go <li>Changed <code>ticketExpiresAt</code> initialization to use <br><code>sql.TimestampTz(time.Now())</code>.<br> <li> Ensured <code>ticketExpiresAt</code> is always set to a non-null value.<br> </details> </td> <td><a href="https://github.com/nhost/hasura-auth/pull/588/files#diff-6aaacc47584f1edde5a01051611a7baffc583fc32b48df6d7fee39afa16a65cb">+1/-1</a> </td> </tr> </table></td></tr></tr></tbody></table> ___ > 💡 **PR-Agent usage**: Comment `/help "your question"` on any pull request to receive relevant information
- Loading branch information