'use strict';

module.exports = function(app) {
    // Root routing
    var core = require('../../app/controllers/core.server.controller');
    app.route('/').get(core.index);
    app.route('/cua_hang_khong_ton_tai').get(core.notFound);
    app.route('/duong-dan-khong-ton-tai').get(core.notFound);
    app.route('/server_tam_dung').get(core.serverError);

    // app.route('/dang-ky').get(core.getStoreTypes, core.getModulePackages, core.register);
    app.route('/dang-ky').get(core.register);
    app.route('/dang-ky-su-dung').post(core.registerUse);

    app.route('/dang-ky-dung-thu').post(core.registerTrial);

    app.route('/dang-ky-lam-dai-ly').get(core.registerAgency);
    app.route('/dang-ky-dai-ly').post(core.registerAgencyPost);

    app.route('/dang-ky-thanh-cong').get(core.registerOk);
    app.route('/dang-ky-dung-thu-thanh-cong').get(core.registerTrialSuccess);
    app.route('/dang-ky-dai-ly-thanh-cong').get(core.registerAgencySuccess);

    app.route('/thong-tin-lien-he').post(core.contactPost);
    // app.route('/tinh-nang/:title_url').get(core.feature.details);
    app.route('/tinh-nang').get(core.details);
    app.route('/bang-gia').get(core.pricePage);
    app.route('/blog').get(core.listBlog);
    app.route('/blog/cate/:blog_category_url').get(core.listBlogCategory);
    app.route('/blog/tags/:tag').get(core.listBlogByTags);
    app.route('/blog/:title_url').get(core.getBlogDetail);
    app.route('/lien-he').get(core.contact);
    app.route('/lien-he-thanh-cong').get(core.contactSuccess);
    app.route('/van-ban').get(core.document);
    app.route('/tra-cuu-hop-dong').get(core.search);
    app.route('/mau-hoa-don').get(core.bills);

    // app.route('/phan-mem-quan-ly-ban-hang').get(core.about);
    app.route('/dieu-khoan').get(core.policy);
    app.route('/ho-tro').get(core.support);
    app.route('/ho-tro/faq').get(core.faq);
    app.route('/ho-tro/video').get(core.supportVideo);
    app.route('/ho-tro/video/:title_url').get(core.supportVideoDetail);
    //app.route('/ho-tro/huong-dan/:title_url').get(core.supportDetail);
    app.route('/huong-dan/:cate_url').get(core.supportCateDetail);
    app.route('/huong-dan/:cate_url/:title_url').get(core.supportDetail);
    app.route('/thanh-toan').get(core.payment);
    app.route('/tuyen-dung').get(core.recruitment);
    app.route('/huy-khuyen-mai').get(core.cancelPromotion);
    app.route('/register-promotion').post(core.registerPromotion);
    app.route('/contactMail').post(core.contactMail);
    app.route('/gioi-thieu-webstore').get(core.introWebStore);
    app.route('/chinh-sach-bao-mat').get(core.security_infomation);
    app.route('/resources').get(core.resources);
    app.route('/chinh-sach-dai-ly').get(core.policyAgency);

    // VNPAY
    app.route('/create-payment-url').post(core.createPaymentUrl);
    app.route('/vnpay-return').get(core.vnPayReturn);
    app.route('/vnpay-ipn').get(core.vnPayIPN);
    app.route('/vnpay-list').get(core.vnPayList);

    // MOMO
    app.route('/create-momo-payment-url').post(core.createPaymentMomoUrl);
    app.route('/momo-return').get(core.momoReturn);
    app.route('/momo-ipn').get(core.momoIPN);

    // MST
    app.route('/get-mst').post(core.getCompanyInfoByMST);
    app.route('/check-mdl').post(core.checkMaDL);

    // SEND MAIL
    app.route('/send-mail').post(core.sendEmail);

};
