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

Slack通知のURLを実委人向けのものに修正 #291

Merged
merged 1 commit into from
May 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion crates/sos24-use-case/src/form/interactor/create.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ impl<R: Repositories, A: Adapters> FormUseCase<R, A> {
.notify(format!(
"申請「{}」が作成されました。\n{}",
form_title.value(),
app_url::form(ctx, form_id.clone()),
app_url::committee_form(ctx, form_id.clone()),
))
.await?;

Expand Down
2 changes: 1 addition & 1 deletion crates/sos24-use-case/src/news/interactor/create.rs
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ Email : {email}
.notify(format!(
"お知らせ「{}」が公開されました。\n{}",
news.title().clone().value(),
app_url::news(ctx, news_id.clone()),
app_url::committee_news(ctx, news_id.clone()),
))
.await?;

Expand Down
2 changes: 1 addition & 1 deletion crates/sos24-use-case/src/project/interactor/create.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ impl<R: Repositories, A: Adapters> ProjectUseCase<R, A> {
.notify(format!(
"企画「{}」が登録されました。\n{}",
project_title,
app_url::project(ctx, project_id.clone()),
app_url::committee_project(ctx, project_id.clone()),
))
.await?;

Expand Down
24 changes: 22 additions & 2 deletions crates/sos24-use-case/src/shared/app_url.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,26 @@ pub fn news(ctx: &impl ContextProvider, news_id: NewsId) -> String {
format!("{}/news/{}", ctx.config().app_url, news_id.value())
}

pub fn project(ctx: &impl ContextProvider, project_id: ProjectId) -> String {
format!("{}/projects/{}", ctx.config().app_url, project_id.value())
pub fn committee_form(ctx: &impl ContextProvider, form_id: FormId) -> String {
format!(
"{}/committee/forms/{}",
ctx.config().app_url,
form_id.value()
)
}

pub fn committee_news(ctx: &impl ContextProvider, news_id: NewsId) -> String {
format!(
"{}/committee/news/{}",
ctx.config().app_url,
news_id.value()
)
}

pub fn committee_project(ctx: &impl ContextProvider, project_id: ProjectId) -> String {
format!(
"{}/committee/projects/{}",
ctx.config().app_url,
project_id.value()
)
}