mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-17 17:36:08 +08:00
12 lines
371 B
TypeScript
12 lines
371 B
TypeScript
import { Handler } from '../service/server';
|
|
|
|
class ProblemCategoryCompatHandler extends Handler {
|
|
async get({ category }) {
|
|
this.response.redirect = this.url('problem_main', { query: { q: `category:${category}` } });
|
|
}
|
|
}
|
|
|
|
export const apply = (ctx) => {
|
|
ctx.Route('problem_category_compat', '/p/category/:category', ProblemCategoryCompatHandler);
|
|
};
|