This commit is contained in:
Mothana 2024-07-23 22:31:00 +04:00
parent 9645ac7337
commit 443b03accb
2 changed files with 2 additions and 2 deletions

View file

@ -12,7 +12,7 @@ const serverOptions = (mainHandler: Main): ServerOptions => {
MetricsAuthGuard: metricsAuth,
AppAuthGuard: async (authHeader) => { return { app_id: mainHandler.applicationManager.DecodeAppToken(stripBearer(authHeader)) } },
UserAuthGuard: async (authHeader) => { return mainHandler.appUserManager.DecodeUserToken(stripBearer(authHeader)) },
GuestWithPubAuthGuard: async (_) => ({ pub: "", app_id: "" }),
GuestWithPubAuthGuard: async (_) => { throw new Error("Nostr only route") },
GuestAuthGuard: async (_) => ({}),
metricsCallback: metrics => mainHandler.settings.recordPerformance ? mainHandler.metricsManager.AddMetrics(metrics) : null,
allowCors: true,

View file

@ -174,7 +174,7 @@ export default class {
async AddInviteToken(app: Application, sats?: number) {
return this.txQueue.PushToQueue({
dbTx: true,
dbTx: false,
exec:async tx => {
const inviteRepo = tx.getRepository(InviteToken);
const newInviteToken = inviteRepo.create({