feat(service): expand service layer with new domain operations
- Add IM service modules: audit, channel roles, custom emojis, forum tags, integrations, invitations, repo links, slash commands, stages, voice, webhooks - Add PR service modules: review requests, templates - Add repo service modules: contributors, release assets, git extras (archive, branch rename, commit extras, diff/merge, tag, tree) - Add user service: social (follow/block) - Add internal auth service - Update existing service modules with expanded functionality - Remove deleted IM modules: articles, delivery trace, drafts, follows, messages, polls, presence, reactions, threads
This commit is contained in:
+11
-3
@@ -68,9 +68,17 @@ impl UserService {
|
||||
.execute(self.ctx.db.writer())
|
||||
.await
|
||||
.map_err(AppError::Database)?;
|
||||
self.find_user_profile(user_uid)
|
||||
.await?
|
||||
.ok_or(AppError::UserNotFound)
|
||||
// Read from writer to avoid replication lag
|
||||
sqlx::query_as::<_, UserProfile>(
|
||||
"SELECT user_id, full_name, company, location, website_url, twitter_username, \
|
||||
timezone, language, profile_readme, created_at, updated_at \
|
||||
FROM user_profile WHERE user_id = $1",
|
||||
)
|
||||
.bind(user_uid)
|
||||
.fetch_optional(self.ctx.db.writer())
|
||||
.await
|
||||
.map_err(AppError::Database)?
|
||||
.ok_or(AppError::UserNotFound)
|
||||
}
|
||||
|
||||
async fn find_user_profile(
|
||||
|
||||
Reference in New Issue
Block a user