[PR #393] [MERGED] fix: get user role before all requests #557

Closed
opened 2026-02-26 21:31:47 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/dreamhunter2333/cloudflare_temp_email/pull/393
Author: @dreamhunter2333
Created: 8/11/2024
Status: Merged
Merged: 8/11/2024
Merged by: @dreamhunter2333

Base: mainHead: feature/dev


📝 Commits (1)

  • c7b583f fix: get user role before all requests

📊 Changes

4 files changed (+15 additions, -8 deletions)

View changed files

📝 .github/workflows/pr_agent.yml (+0 -1)
📝 CHANGELOG.md (+4 -0)
📝 frontend/src/App.vue (+8 -1)
📝 frontend/src/views/Header.vue (+3 -6)

📄 Description

User description

#381
#391


PR Type

Bug fix, Enhancement


Description

  • Added an API call to fetch user settings on component mount in App.vue, with error handling.
  • Optimized the user settings fetch in Header.vue by removing redundant API call and adding a conditional check.
  • Updated GitHub Actions workflow by removing the issue_comment trigger.
  • Updated CHANGELOG.md to include an entry for version v0.7.1, noting the fix for the user role loading issue.

Changes walkthrough 📝

Relevant files
Enhancement
App.vue
Fetch user settings on component mount with error handling

frontend/src/App.vue

  • Added API call to fetch user settings on component mount.
  • Wrapped the API call in a try-catch block to handle potential errors.
  • +8/-1     
    Header.vue
    Optimize user settings fetch in Header component                 

    frontend/src/views/Header.vue

  • Removed redundant API call to fetch user settings.
  • Added a conditional check to ensure user_id is fetched before making
    the API call.
  • +3/-6     
    Configuration changes
    pr_agent.yml
    Update GitHub Actions workflow triggers                                   

    .github/workflows/pr_agent.yml

    • Removed issue_comment trigger from the GitHub Actions workflow.
    +0/-1     
    Documentation
    CHANGELOG.md
    Update CHANGELOG for version v0.7.1                                           

    CHANGELOG.md

  • Added entry for version v0.7.1 noting the fix for user role loading
    issue.
  • +4/-0     

    💡 PR-Agent usage:
    Comment /help on the PR to get a list of all available PR-Agent tools and their descriptions


    🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

    ## 📋 Pull Request Information **Original PR:** https://github.com/dreamhunter2333/cloudflare_temp_email/pull/393 **Author:** [@dreamhunter2333](https://github.com/dreamhunter2333) **Created:** 8/11/2024 **Status:** ✅ Merged **Merged:** 8/11/2024 **Merged by:** [@dreamhunter2333](https://github.com/dreamhunter2333) **Base:** `main` ← **Head:** `feature/dev` --- ### 📝 Commits (1) - [`c7b583f`](https://github.com/dreamhunter2333/cloudflare_temp_email/commit/c7b583f6e74cb6491a42bc20370e34c20568127d) fix: get user role before all requests ### 📊 Changes **4 files changed** (+15 additions, -8 deletions) <details> <summary>View changed files</summary> 📝 `.github/workflows/pr_agent.yml` (+0 -1) 📝 `CHANGELOG.md` (+4 -0) 📝 `frontend/src/App.vue` (+8 -1) 📝 `frontend/src/views/Header.vue` (+3 -6) </details> ### 📄 Description ### **User description** #381 #391 ___ ### **PR Type** Bug fix, Enhancement ___ ### **Description** - Added an API call to fetch user settings on component mount in `App.vue`, with error handling. - Optimized the user settings fetch in `Header.vue` by removing redundant API call and adding a conditional check. - Updated GitHub Actions workflow by removing the `issue_comment` trigger. - Updated `CHANGELOG.md` to include an entry for version v0.7.1, noting the fix for the user role loading issue. ___ ### **Changes walkthrough** 📝 <table><thead><tr><th></th><th align="left">Relevant files</th></tr></thead><tbody><tr><td><strong>Enhancement</strong></td><td><table> <tr> <td> <details> <summary><strong>App.vue</strong><dd><code>Fetch user settings on component mount with error handling</code></dd></summary> <hr> frontend/src/App.vue <li>Added API call to fetch user settings on component mount.<br> <li> Wrapped the API call in a try-catch block to handle potential errors.<br> </details> </td> <td><a href="https://github.com/dreamhunter2333/cloudflare_temp_email/pull/393/files#diff-08bef502d8d33bea18f88fb6f472577fe30ae672500e5429b089c3e9bd686878">+8/-1</a>&nbsp; &nbsp; &nbsp; </td> </tr> <tr> <td> <details> <summary><strong>Header.vue</strong><dd><code>Optimize user settings fetch in Header component</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary> <hr> frontend/src/views/Header.vue <li>Removed redundant API call to fetch user settings.<br> <li> Added a conditional check to ensure <code>user_id</code> is fetched before making <br>the API call.<br> </details> </td> <td><a href="https://github.com/dreamhunter2333/cloudflare_temp_email/pull/393/files#diff-a80b3d70a6be259910c988c05d497228b10a5e686042743c1831584fb391360d">+3/-6</a>&nbsp; &nbsp; &nbsp; </td> </tr> </table></td></tr><tr><td><strong>Configuration changes</strong></td><td><table> <tr> <td> <details> <summary><strong>pr_agent.yml</strong><dd><code>Update GitHub Actions workflow triggers</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary> <hr> .github/workflows/pr_agent.yml - Removed `issue_comment` trigger from the GitHub Actions workflow. </details> </td> <td><a href="https://github.com/dreamhunter2333/cloudflare_temp_email/pull/393/files#diff-fc2b2ed01cad745cb09e9c20e7c91db7f4f1eb9796abb84bbdce7dd0f77dace8">+0/-1</a>&nbsp; &nbsp; &nbsp; </td> </tr> </table></td></tr><tr><td><strong>Documentation</strong></td><td><table> <tr> <td> <details> <summary><strong>CHANGELOG.md</strong><dd><code>Update CHANGELOG for version v0.7.1</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary> <hr> CHANGELOG.md <li>Added entry for version v0.7.1 noting the fix for user role loading <br>issue.<br> </details> </td> <td><a href="https://github.com/dreamhunter2333/cloudflare_temp_email/pull/393/files#diff-06572a96a58dc510037d5efa622f9bec8519bc1beab13c9f251e97e657a9d4ed">+4/-0</a>&nbsp; &nbsp; &nbsp; </td> </tr> </table></td></tr></tr></tbody></table> ___ > 💡 **PR-Agent usage**: >Comment `/help` on the PR to get a list of all available PR-Agent tools and their descriptions --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
    kerem 2026-02-26 21:31:47 +03:00
    Sign in to join this conversation.
    No milestone
    No project
    No assignees
    1 participant
    Notifications
    Due date
    The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

    No due date set.

    Dependencies

    No dependencies set.

    Reference
    starred/cloudflare_temp_email#557
    No description provided.