first commit
This commit is contained in:
1
dist/controller/.pydio
vendored
Normal file
1
dist/controller/.pydio
vendored
Normal file
@@ -0,0 +1 @@
|
||||
b8aa34c8-175a-43ce-91ad-e766884dc2a0
|
||||
1
dist/controller/admin/.pydio
vendored
Normal file
1
dist/controller/admin/.pydio
vendored
Normal file
@@ -0,0 +1 @@
|
||||
2cb09cb8-309b-4514-b520-44d2e79021dd
|
||||
59
dist/controller/admin/AdminController.js
vendored
Normal file
59
dist/controller/admin/AdminController.js
vendored
Normal file
@@ -0,0 +1,59 @@
|
||||
"use strict";
|
||||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
||||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
||||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
||||
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
||||
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
||||
};
|
||||
var __metadata = (this && this.__metadata) || function (k, v) {
|
||||
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
||||
};
|
||||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
||||
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
||||
return new (P || (P = Promise))(function (resolve, reject) {
|
||||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
||||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
||||
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||
});
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const routing_controllers_1 = require("routing-controllers");
|
||||
const JsonResponseMiddlewares_1 = require("../../middleware/JsonResponseMiddlewares");
|
||||
const typedi_1 = require("typedi");
|
||||
const config_1 = require("../../config");
|
||||
const utils_1 = require("../../utils/utils");
|
||||
const qiniu_1 = require("../../plugins/qiniu");
|
||||
let AdminController = class AdminController {
|
||||
/**
|
||||
* 获取上传token,服务于图片,视频的上传
|
||||
* http://www.geekhelp.cn/bmy/api/admin/token
|
||||
* @param params
|
||||
* @constructor
|
||||
*/
|
||||
Token() {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return { qn_token: this.qiniu.GenerateToken() };
|
||||
});
|
||||
}
|
||||
};
|
||||
__decorate([
|
||||
typedi_1.Inject(),
|
||||
__metadata("design:type", utils_1.utils)
|
||||
], AdminController.prototype, "utils", void 0);
|
||||
__decorate([
|
||||
typedi_1.Inject(),
|
||||
__metadata("design:type", qiniu_1.QiNiu)
|
||||
], AdminController.prototype, "qiniu", void 0);
|
||||
__decorate([
|
||||
routing_controllers_1.Post("/token"),
|
||||
__metadata("design:type", Function),
|
||||
__metadata("design:paramtypes", []),
|
||||
__metadata("design:returntype", Promise)
|
||||
], AdminController.prototype, "Token", null);
|
||||
AdminController = __decorate([
|
||||
typedi_1.Service(),
|
||||
routing_controllers_1.JsonController(`${config_1.config.apiurl}/admin`),
|
||||
routing_controllers_1.UseInterceptor(JsonResponseMiddlewares_1.JsonResponseInterceptor)
|
||||
], AdminController);
|
||||
exports.AdminController = AdminController;
|
||||
1
dist/controller/api/.pydio
vendored
Normal file
1
dist/controller/api/.pydio
vendored
Normal file
@@ -0,0 +1 @@
|
||||
098941e8-0c40-4428-8a75-a93cb6d7ab4c
|
||||
17
dist/controller/api/TestController.js
vendored
Normal file
17
dist/controller/api/TestController.js
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
"use strict";
|
||||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
||||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
||||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
||||
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
||||
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const routing_controllers_1 = require("routing-controllers");
|
||||
const typedi_1 = require("typedi");
|
||||
let TestControllerApi = class TestControllerApi {
|
||||
};
|
||||
TestControllerApi = __decorate([
|
||||
typedi_1.Service(),
|
||||
routing_controllers_1.Controller()
|
||||
], TestControllerApi);
|
||||
exports.TestControllerApi = TestControllerApi;
|
||||
17
dist/controller/api/TestControllerApi.js
vendored
Normal file
17
dist/controller/api/TestControllerApi.js
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
"use strict";
|
||||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
||||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
||||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
||||
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
||||
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const routing_controllers_1 = require("routing-controllers");
|
||||
const typedi_1 = require("typedi");
|
||||
let TestControllerApi = class TestControllerApi {
|
||||
};
|
||||
TestControllerApi = __decorate([
|
||||
typedi_1.Service(),
|
||||
routing_controllers_1.Controller()
|
||||
], TestControllerApi);
|
||||
exports.TestControllerApi = TestControllerApi;
|
||||
110
dist/controller/api/UserControllerApi.js
vendored
Normal file
110
dist/controller/api/UserControllerApi.js
vendored
Normal file
@@ -0,0 +1,110 @@
|
||||
"use strict";
|
||||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
||||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
||||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
||||
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
||||
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
||||
};
|
||||
var __metadata = (this && this.__metadata) || function (k, v) {
|
||||
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
||||
};
|
||||
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
||||
return function (target, key) { decorator(target, key, paramIndex); }
|
||||
};
|
||||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
||||
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
||||
return new (P || (P = Promise))(function (resolve, reject) {
|
||||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
||||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
||||
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||
});
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const routing_controllers_1 = require("routing-controllers");
|
||||
const config_1 = require("../../config");
|
||||
const JsonResponseMiddlewares_1 = require("../../middleware/JsonResponseMiddlewares");
|
||||
const typedi_1 = require("typedi");
|
||||
const UserServiceImpl_1 = require("../../service/impl/UserServiceImpl");
|
||||
const UserModel_1 = require("../../model/UserModel");
|
||||
const LogsMiddlewares_1 = require("../../middleware/LogsMiddlewares");
|
||||
let UserControllerApi = class UserControllerApi {
|
||||
/**
|
||||
* @api {get} /user/oneUser oneUser
|
||||
* @apiVersion 1.1.0
|
||||
* @apiDescription 获取一条用户记录
|
||||
* @apiName oneUser
|
||||
* @apiGroup user
|
||||
* @apiParam {string} id 用户id
|
||||
* @apiSuccessExample {json} 请求成功的返回:
|
||||
* {
|
||||
* "status" : 200,
|
||||
* "result" : {
|
||||
* }
|
||||
* }
|
||||
* @apiErrorExample {json} 请求失败的返回
|
||||
* {
|
||||
* "status":200,
|
||||
* "result":{
|
||||
* }
|
||||
* }
|
||||
* @apiSampleRequest http://www.geekhelp.cn/bmy/api/user/oneUser
|
||||
* @apiVersion 1.0.0
|
||||
*/
|
||||
oneUser(query) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return yield this.userServiceImpl.getOneUserService(query.id);
|
||||
});
|
||||
}
|
||||
/**
|
||||
* @api {get} /user/allUser allUser
|
||||
* @apiVersion 1.1.0
|
||||
* @apiDescription 获取所有用户信息
|
||||
* @apiName allUser
|
||||
* @apiGroup user
|
||||
* @apiSuccessExample {json} 请求成功的返回:
|
||||
* {
|
||||
* "status" : 200,
|
||||
* "result" : {
|
||||
* }
|
||||
* }
|
||||
* @apiErrorExample {json} 请求失败的返回
|
||||
* {
|
||||
* "status":200,
|
||||
* "result":{
|
||||
* }
|
||||
* }
|
||||
* @apiSampleRequest http://www.geekhelp.cn/bmy/api/user/allUser
|
||||
* @apiVersion 1.0.0
|
||||
*/
|
||||
allUser() {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return yield this.userServiceImpl.getAllUserService();
|
||||
});
|
||||
}
|
||||
};
|
||||
__decorate([
|
||||
typedi_1.Inject(),
|
||||
__metadata("design:type", UserServiceImpl_1.UserServiceImpl)
|
||||
], UserControllerApi.prototype, "userServiceImpl", void 0);
|
||||
__decorate([
|
||||
routing_controllers_1.Get("/oneUser"),
|
||||
routing_controllers_1.UseBefore(LogsMiddlewares_1.LogsMiddlewares),
|
||||
__param(0, routing_controllers_1.QueryParams()),
|
||||
__metadata("design:type", Function),
|
||||
__metadata("design:paramtypes", [UserModel_1.UserModel]),
|
||||
__metadata("design:returntype", Promise)
|
||||
], UserControllerApi.prototype, "oneUser", null);
|
||||
__decorate([
|
||||
routing_controllers_1.Get("/allUser"),
|
||||
routing_controllers_1.UseBefore(LogsMiddlewares_1.LogsMiddlewares),
|
||||
__metadata("design:type", Function),
|
||||
__metadata("design:paramtypes", []),
|
||||
__metadata("design:returntype", Promise)
|
||||
], UserControllerApi.prototype, "allUser", null);
|
||||
UserControllerApi = __decorate([
|
||||
typedi_1.Service(),
|
||||
routing_controllers_1.JsonController(`${config_1.config.apiurl}/user`),
|
||||
routing_controllers_1.UseInterceptor(JsonResponseMiddlewares_1.JsonResponseInterceptor)
|
||||
], UserControllerApi);
|
||||
exports.UserControllerApi = UserControllerApi;
|
||||
17
dist/controller/api/homeControllerApi.js
vendored
Normal file
17
dist/controller/api/homeControllerApi.js
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
"use strict";
|
||||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
||||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
||||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
||||
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
||||
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const routing_controllers_1 = require("routing-controllers");
|
||||
const typedi_1 = require("typedi");
|
||||
let homeControllerApi = class homeControllerApi {
|
||||
};
|
||||
homeControllerApi = __decorate([
|
||||
typedi_1.Service(),
|
||||
routing_controllers_1.Controller()
|
||||
], homeControllerApi);
|
||||
exports.homeControllerApi = homeControllerApi;
|
||||
1
dist/controller/home/.pydio
vendored
Normal file
1
dist/controller/home/.pydio
vendored
Normal file
@@ -0,0 +1 @@
|
||||
7187985f-096d-45fa-b2af-836bc0200513
|
||||
44
dist/controller/home/AboutControllerHome.js
vendored
Normal file
44
dist/controller/home/AboutControllerHome.js
vendored
Normal file
@@ -0,0 +1,44 @@
|
||||
"use strict";
|
||||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
||||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
||||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
||||
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
||||
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
||||
};
|
||||
var __metadata = (this && this.__metadata) || function (k, v) {
|
||||
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
||||
};
|
||||
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
||||
return function (target, key) { decorator(target, key, paramIndex); }
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const routing_controllers_1 = require("routing-controllers");
|
||||
const utils_1 = require("../../utils/utils");
|
||||
let AboutControllerHome = class AboutControllerHome {
|
||||
About(session) {
|
||||
return {
|
||||
title: utils_1.utils.titleName("关于"),
|
||||
isShowAction: {
|
||||
header: true,
|
||||
footer: true
|
||||
},
|
||||
banner: {
|
||||
bannerTitle: '关于怪客',
|
||||
bannerUrl: '/img/banner_5.jpg',
|
||||
},
|
||||
login: session.user ? session.user : false
|
||||
};
|
||||
}
|
||||
};
|
||||
__decorate([
|
||||
routing_controllers_1.Get("/about"),
|
||||
routing_controllers_1.Render("home/page/about"),
|
||||
__param(0, routing_controllers_1.Session()),
|
||||
__metadata("design:type", Function),
|
||||
__metadata("design:paramtypes", [Object]),
|
||||
__metadata("design:returntype", void 0)
|
||||
], AboutControllerHome.prototype, "About", null);
|
||||
AboutControllerHome = __decorate([
|
||||
routing_controllers_1.Controller()
|
||||
], AboutControllerHome);
|
||||
exports.AboutControllerHome = AboutControllerHome;
|
||||
35
dist/controller/home/ErrorControllerHome.js
vendored
Normal file
35
dist/controller/home/ErrorControllerHome.js
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
"use strict";
|
||||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
||||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
||||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
||||
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
||||
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
||||
};
|
||||
var __metadata = (this && this.__metadata) || function (k, v) {
|
||||
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const routing_controllers_1 = require("routing-controllers");
|
||||
const utils_1 = require("../../utils/utils");
|
||||
let ErrorControllerHome = class ErrorControllerHome {
|
||||
Error() {
|
||||
return {
|
||||
title: utils_1.utils.titleName("404..."),
|
||||
isShowAction: {
|
||||
header: false,
|
||||
footer: false
|
||||
}
|
||||
};
|
||||
}
|
||||
};
|
||||
__decorate([
|
||||
routing_controllers_1.Get("/error"),
|
||||
routing_controllers_1.Render("home/page/error"),
|
||||
__metadata("design:type", Function),
|
||||
__metadata("design:paramtypes", []),
|
||||
__metadata("design:returntype", void 0)
|
||||
], ErrorControllerHome.prototype, "Error", null);
|
||||
ErrorControllerHome = __decorate([
|
||||
routing_controllers_1.Controller()
|
||||
], ErrorControllerHome);
|
||||
exports.ErrorControllerHome = ErrorControllerHome;
|
||||
53
dist/controller/home/IndexControllerHome.js
vendored
Normal file
53
dist/controller/home/IndexControllerHome.js
vendored
Normal file
@@ -0,0 +1,53 @@
|
||||
"use strict";
|
||||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
||||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
||||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
||||
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
||||
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
||||
};
|
||||
var __metadata = (this && this.__metadata) || function (k, v) {
|
||||
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
||||
};
|
||||
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
||||
return function (target, key) { decorator(target, key, paramIndex); }
|
||||
};
|
||||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
||||
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
||||
return new (P || (P = Promise))(function (resolve, reject) {
|
||||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
||||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
||||
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||
});
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const routing_controllers_1 = require("routing-controllers");
|
||||
const utils_1 = require("../../utils/utils");
|
||||
const typedi_1 = require("typedi");
|
||||
let IndexControllerHome = class IndexControllerHome {
|
||||
Index(session) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return {
|
||||
title: utils_1.utils.titleName("首页"),
|
||||
isShowAction: {
|
||||
header: true,
|
||||
footer: true
|
||||
},
|
||||
login: session.user ? session.user : false
|
||||
};
|
||||
});
|
||||
}
|
||||
};
|
||||
__decorate([
|
||||
routing_controllers_1.Get("/"),
|
||||
routing_controllers_1.Render("home/page/index"),
|
||||
__param(0, routing_controllers_1.Session()),
|
||||
__metadata("design:type", Function),
|
||||
__metadata("design:paramtypes", [Object]),
|
||||
__metadata("design:returntype", Promise)
|
||||
], IndexControllerHome.prototype, "Index", null);
|
||||
IndexControllerHome = __decorate([
|
||||
typedi_1.Service(),
|
||||
routing_controllers_1.Controller()
|
||||
], IndexControllerHome);
|
||||
exports.IndexControllerHome = IndexControllerHome;
|
||||
17
dist/controller/home/TestControllerHome.js
vendored
Normal file
17
dist/controller/home/TestControllerHome.js
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
"use strict";
|
||||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
||||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
||||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
||||
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
||||
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const routing_controllers_1 = require("routing-controllers");
|
||||
const typedi_1 = require("typedi");
|
||||
let TestControllerHome = class TestControllerHome {
|
||||
};
|
||||
TestControllerHome = __decorate([
|
||||
typedi_1.Service(),
|
||||
routing_controllers_1.Controller()
|
||||
], TestControllerHome);
|
||||
exports.TestControllerHome = TestControllerHome;
|
||||
56
dist/controller/home/UserActionController.js
vendored
Normal file
56
dist/controller/home/UserActionController.js
vendored
Normal file
@@ -0,0 +1,56 @@
|
||||
"use strict";
|
||||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
||||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
||||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
||||
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
||||
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
||||
};
|
||||
var __metadata = (this && this.__metadata) || function (k, v) {
|
||||
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
||||
};
|
||||
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
||||
return function (target, key) { decorator(target, key, paramIndex); }
|
||||
};
|
||||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
||||
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
||||
return new (P || (P = Promise))(function (resolve, reject) {
|
||||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
||||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
||||
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||
});
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const routing_controllers_1 = require("routing-controllers");
|
||||
const utils_1 = require("../../utils/utils");
|
||||
let UserActionController = class UserActionController {
|
||||
reg(session, res) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (!session || !session.user) {
|
||||
return {
|
||||
title: utils_1.utils.titleName("注册"),
|
||||
isShowAction: {
|
||||
header: false,
|
||||
footer: false
|
||||
}
|
||||
};
|
||||
}
|
||||
else {
|
||||
res.redirect('/error');
|
||||
return res;
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
__decorate([
|
||||
routing_controllers_1.Get("/register"),
|
||||
routing_controllers_1.Render("home/page/register"),
|
||||
__param(0, routing_controllers_1.Session()), __param(1, routing_controllers_1.Res()),
|
||||
__metadata("design:type", Function),
|
||||
__metadata("design:paramtypes", [Object, Object]),
|
||||
__metadata("design:returntype", Promise)
|
||||
], UserActionController.prototype, "reg", null);
|
||||
UserActionController = __decorate([
|
||||
routing_controllers_1.Controller()
|
||||
], UserActionController);
|
||||
exports.UserActionController = UserActionController;
|
||||
5
dist/controller/home/UserOperation.js
vendored
Normal file
5
dist/controller/home/UserOperation.js
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
class UserOperation {
|
||||
}
|
||||
exports.UserOperation = UserOperation;
|
||||
Reference in New Issue
Block a user