mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
core&ui: enhanced category selector
This commit is contained in:
1 parent
74f4e44f0f
commit
6567c739b6
12 files changed
+45
-54
No files matched your search
@@ -0,0 +1,11 @@
|
||||
import { Handler, Route } from '../service/server';
|
||||
|
||||
class ProblemCategoryCompatHandler extends Handler {
|
||||
async get({ category }) {
|
||||
this.response.redirect = this.url('problem_main', { query: { q: `category:${category}` } });
|
||||
}
|
||||
}
|
||||
|
||||
global.Hydro.handler.compat = () => {
|
||||
Route('problem_category_compat', '/p/category/:category', ProblemCategoryCompatHandler);
|
||||
};
|
||||
Reference in new issue
Block a user