archetecture security fix

This commit is contained in:
root
2026-06-11 03:22:12 -04:00
parent 6def9993da
commit 9483750161
3126 changed files with 177194 additions and 37211 deletions
+26
View File
@@ -0,0 +1,26 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.presentAdminUser = presentAdminUser;
exports.presentAdminSession = presentAdminSession;
exports.presentPaginated = presentPaginated;
function presentAdminUser(admin) {
const { passwordHash, totpSecret, ...safe } = admin;
return safe;
}
function presentAdminSession(admin, token) {
return {
token,
admin: presentAdminUser(admin),
};
}
function presentPaginated(data, total, page, pageSize, extra = {}) {
return {
data,
total,
page,
pageSize,
totalPages: Math.ceil(total / pageSize),
...extra,
};
}
//# sourceMappingURL=admin.presenter.js.map