Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

♻️ refactor: seperate user keyvaults encrpyto from user model #5102

Merged
merged 1 commit into from
Dec 20, 2024

Conversation

arvinxx
Copy link
Contributor

@arvinxx arvinxx commented Dec 20, 2024

💻 变更类型 | Change Type

  • ✨ feat
  • 🐛 fix
  • ♻️ refactor
  • 💄 style
  • 👷 build
  • ⚡️ perf
  • 📝 docs
  • 🔨 chore

🔀 变更说明 | Description of Change

将耦合在 model 层的用户秘钥加密逻辑,迁移到 router 层与 service 层

📝 补充信息 | Additional Information

Copy link

vercel bot commented Dec 20, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
lobe-chat-database ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 20, 2024 0:06am
lobe-chat-preview ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 20, 2024 0:06am

@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Dec 20, 2024
@lobehubbot
Copy link
Member

👍 @arvinxx

Thank you for raising your pull request and contributing to our Community
Please make sure you have followed our contributing guidelines. We will review it as soon as possible.
If you encounter any problems, please feel free to connect with us.
非常感谢您提出拉取请求并为我们的社区做出贡献,请确保您已经遵循了我们的贡献指南,我们会尽快审查它。
如果您遇到任何问题,请随时与我们联系。

@arvinxx arvinxx changed the title ♻️ refactor: refactor user model implement ♻️ refactor: seperate user keyvaults encrpyto from user model Dec 20, 2024
Copy link

codecov bot commented Dec 20, 2024

Codecov Report

Attention: Patch coverage is 59.25926% with 22 lines in your changes missing coverage. Please review.

Project coverage is 91.88%. Comparing base (e368f38) to head (f28cbb4).
Report is 6 commits behind head on main.

Files with missing lines Patch % Lines
src/server/modules/KeyVaultsEncrypt/index.ts 13.04% 20 Missing ⚠️
src/server/services/user/index.ts 60.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5102      +/-   ##
==========================================
- Coverage   91.93%   91.88%   -0.05%     
==========================================
  Files         548      548              
  Lines       41483    41479       -4     
  Branches     3554     2355    -1199     
==========================================
- Hits        38136    38113      -23     
- Misses       3347     3366      +19     
Flag Coverage Δ
app 91.88% <59.25%> (-0.05%) ⬇️
server 97.72% <100.00%> (+0.11%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

gru-agent bot commented Dec 20, 2024

TestGru Assignment

Summary

Link CommitId Status Reason
Detail f28cbb4 ✅ Finished

Files

File Pull Request
src/database/schemas/user.ts ❌ Failure (I failed to write the unit tests for the file.)
src/database/server/models/user.ts ❌ Failure (I failed to write the unit tests for the file.)
src/server/modules/KeyVaultsEncrypt/index.ts ❌ Failure (I failed to write the unit tests for the file.)
src/server/routers/lambda/user.ts ❌ Failure (I failed to write the unit tests for the file.)
src/server/services/user/index.ts ❌ Failure (I failed to write the unit tests for the file.)

Tip

You can @gru-agent and leave your feedback. TestGru will make adjustments based on your input

@arvinxx arvinxx merged commit 09b63cf into main Dec 20, 2024
11 of 12 checks passed
@arvinxx arvinxx deleted the refactor/user-model-getState branch December 20, 2024 12:18
@lobehubbot
Copy link
Member

❤️ Great PR @arvinxx ❤️

The growth of project is inseparable from user feedback and contribution, thanks for your contribution! If you are interesting with the lobehub developer community, please join our discord and then dm @arvinxx or @canisminor1990. They will invite you to our private developer channel. We are talking about the lobe-chat development or sharing ai newsletter around the world.
项目的成长离不开用户反馈和贡献,感谢您的贡献! 如果您对 LobeHub 开发者社区感兴趣,请加入我们的 discord,然后私信 @arvinxx@canisminor1990。他们会邀请您加入我们的私密开发者频道。我们将会讨论关于 Lobe Chat 的开发,分享和讨论全球范围内的 AI 消息。

github-actions bot pushed a commit that referenced this pull request Dec 20, 2024
### [Version&nbsp;1.36.40](v1.36.39...v1.36.40)
<sup>Released on **2024-12-20**</sup>

#### ♻ Code Refactoring

- **misc**: Seperate user keyVaults encrpyto from user model.

<br/>

<details>
<summary><kbd>Improvements and Fixes</kbd></summary>

#### Code refactoring

* **misc**: Seperate user keyVaults encrpyto from user model, closes [#5102](#5102) ([09b63cf](09b63cf))

</details>

<div align="right">

[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top)

</div>
@lobehubbot
Copy link
Member

🎉 This PR is included in version 1.36.40 🎉

The release is available on:

Your semantic-release bot 📦🚀

github-actions bot pushed a commit to bentwnghk/lobe-chat that referenced this pull request Dec 20, 2024
### [Version&nbsp;1.78.15](v1.78.14...v1.78.15)
<sup>Released on **2024-12-20**</sup>

#### ♻ Code Refactoring

- **misc**: Refactor layout props, refactor to use async `headers()`, seperate user keyVaults encrpyto from user model.

<br/>

<details>
<summary><kbd>Improvements and Fixes</kbd></summary>

#### Code refactoring

* **misc**: Refactor layout props, closes [lobehub#5093](https://github.com/bentwnghk/lobe-chat/issues/5093) ([2990b5a](2990b5a))
* **misc**: Refactor to use async `headers()`, closes [lobehub#5097](https://github.com/bentwnghk/lobe-chat/issues/5097) ([e368f38](e368f38))
* **misc**: Seperate user keyVaults encrpyto from user model, closes [lobehub#5102](https://github.com/bentwnghk/lobe-chat/issues/5102) ([09b63cf](09b63cf))

</details>

<div align="right">

[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top)

</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
released size:L This PR changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants