From e9abdd53ae9e7d0070d9bc53c843bb34bbeff0b4 Mon Sep 17 00:00:00 2001 From: Baoshuo Date: Sat, 28 Jan 2023 09:40:46 +0800 Subject: [PATCH] feat(problems/new_remote): provider name as initial tag --- web/app/controllers/new_remote_problem.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/web/app/controllers/new_remote_problem.php b/web/app/controllers/new_remote_problem.php index 02992bc..0cb4562 100644 --- a/web/app/controllers/new_remote_problem.php +++ b/web/app/controllers/new_remote_problem.php @@ -107,6 +107,13 @@ $new_remote_problem_form->handle = function (&$vdata) { ]); dataNewProblem($id); + DB::insert([ + "insert into problems_tags", + "(problem_id, tag)", + "values", + DB::tuple([$id, $remote_provider['name']]), + ]); + redirectTo("/problem/{$id}"); die(); };