feat: esm standard for routes

This commit is contained in:
DIYgod
2024-03-02 03:25:26 +08:00
parent f0e09ee9e0
commit df57bb5d50
3035 changed files with 3040 additions and 3038 deletions
+1 -1
View File
@@ -16,7 +16,7 @@ const titleMap = {
application: '应用',
};
module.exports = async (ctx) => {
export default async (ctx) => {
const channel = ctx.req.param('channel') ?? 'latest';
const url = rootUrl;
+1 -1
View File
@@ -28,7 +28,7 @@ const titleMap = {
public_blockchain: '公链',
};
module.exports = async (ctx) => {
export default async (ctx) => {
const channel = ctx.req.param('channel') ?? 'latest';
const url = `${rootUrl}/kepu.html`;
+1 -1
View File
@@ -5,7 +5,7 @@ import timezone from '@/utils/timezone';
const rootUrl = 'https://www.hellobtc.com';
module.exports = async (ctx) => {
export default async (ctx) => {
const url = `${rootUrl}/news`;
const response = await got(url);
+1 -1
View File
@@ -1,4 +1,4 @@
module.exports = function (router) {
export default (router) => {
router.get('/information/:channel?', './information');
router.get('/news', './news');
router.get('/kepu/:channel?', './kepu');