Add production-ready SuperAdmin API features for tenants, SMS, servers, and plugins.

Includes mobile auth, get_user/get_version, SMS wallet parity endpoints, appearance backfill, and related Prisma migrations.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-07-30 18:19:53 +03:30
co-authored by Cursor
parent ddf36f8470
commit a6b3457779
54 changed files with 3770 additions and 156 deletions
+33
View File
@@ -0,0 +1,33 @@
const { PrismaClient } = require('@prisma/client');
const prisma = new PrismaClient();
async function main() {
const rows = await prisma.tenant.findMany({
select: { id: true, notes: true, appVersion: true },
});
let n = 0;
for (const row of rows) {
const match = String(row.notes || '').match(/version:([^|\s]+)/i);
if (!match?.[1]) continue;
if (row.appVersion && row.appVersion !== '1') continue;
await prisma.tenant.update({
where: { id: row.id },
data: { appVersion: match[1].trim() },
});
n += 1;
}
console.log(`backfilled ${n} of ${rows.length}`);
}
main()
.catch((error) => {
console.error(error);
process.exit(1);
})
.finally(async () => {
await prisma.$disconnect();
});