fix(problem/solutions): 5f15f832af

This commit is contained in:
Baoshuo Ren 2023-01-17 13:56:53 +08:00
parent 561d3052b8
commit 581cc68616
Signed by: baoshuo
GPG Key ID: 00CB9680AB29F51A

View File

@ -118,6 +118,12 @@ if (UOJProblem::cur()->userCanManage(Auth::user()) || UOJProblem::cur()->userPer
$blog_id = DB::insert_id(); $blog_id = DB::insert_id();
DB::insert([
"insert into problems_solutions",
DB::bracketed_fields(["problem_id", "blog_id"]),
"values", DB::tuple([UOJProblem::info('id'), $blog_id]),
]);
redirectTo(HTML::blog_url(Auth::id(), "/post/{$blog_id}/write")); redirectTo(HTML::blog_url(Auth::id(), "/post/{$blog_id}/write"));
die(); die();
}; };