import db from "$db/db"; import { DataTypes } from '@sequelize/core'; const attributes = { id: { type: DataTypes.INTEGER(11), allowNull: false, defaultValue: null, primaryKey: true, autoIncrement: true, comment: null, field: "id" }, with_id: { type: DataTypes.INTEGER(11), allowNull: true, defaultValue: null, primaryKey: false, autoIncrement: false, comment: null, field: "with_id" }, account_id: { type: DataTypes.INTEGER(11), allowNull: true, defaultValue: null, primaryKey: false, autoIncrement: false, comment: null, field: "account_id" }, invoice_id: { type: DataTypes.INTEGER(11), allowNull: true, defaultValue: null, primaryKey: false, autoIncrement: false, comment: null, field: "invoice_id" }, user_id: { type: DataTypes.INTEGER(11), allowNull: true, defaultValue: null, primaryKey: false, autoIncrement: false, comment: null, field: "user_id" }, path: { type: DataTypes.STRING(255), allowNull: true, defaultValue: null, primaryKey: false, autoIncrement: false, comment: null, field: "path" }, memo: { type: DataTypes.TEXT, allowNull: true, defaultValue: null, primaryKey: false, autoIncrement: false, comment: null, field: "memo" }, hash: { type: DataTypes.TEXT, allowNull: true, defaultValue: null, primaryKey: false, autoIncrement: false, comment: null, field: "hash" }, createdAt: { type: DataTypes.DATE, allowNull: false, defaultValue: null, primaryKey: false, autoIncrement: false, comment: null, field: "createdAt" }, updatedAt: { type: DataTypes.DATE, allowNull: false, defaultValue: null, primaryKey: false, autoIncrement: false, comment: null, field: "updatedAt" }, rate: { type: DataTypes.DOUBLE, allowNull: true, defaultValue: null, primaryKey: false, autoIncrement: false, comment: null, field: "rate" }, preimage: { type: DataTypes.STRING(255), allowNull: true, defaultValue: null, primaryKey: false, autoIncrement: false, comment: null, field: "preimage" }, network: { type: DataTypes.STRING(255), allowNull: true, defaultValue: null, primaryKey: false, autoIncrement: false, comment: null, field: "network" }, currency: { type: DataTypes.STRING(255), allowNull: true, defaultValue: null, primaryKey: false, autoIncrement: false, comment: null, field: "currency" }, address: { type: DataTypes.STRING(255), allowNull: true, defaultValue: null, primaryKey: false, autoIncrement: false, comment: null, field: "address" }, received: { type: DataTypes.INTEGER(1), allowNull: true, defaultValue: null, primaryKey: false, autoIncrement: false, comment: null, field: "received" }, amount: { type: DataTypes.DOUBLE, allowNull: true, defaultValue: null, primaryKey: false, autoIncrement: false, comment: null, field: "amount" }, fee: { type: DataTypes.DOUBLE, allowNull: false, defaultValue: 0, primaryKey: false, autoIncrement: false, comment: null, field: "fee" }, tip: { type: DataTypes.DOUBLE, allowNull: false, defaultValue: 0, primaryKey: false, autoIncrement: false, comment: null, field: "tip" }, redeemed: { type: DataTypes.BOOLEAN, allowNull: false, defaultValue: false, primaryKey: false, autoIncrement: false, comment: null, field: "redeemed" }, redeemcode: { type: DataTypes.STRING(255), allowNull: true, defaultValue: null, primaryKey: false, autoIncrement: false, comment: null, field: "redeemcode" }, confirmed: { type: DataTypes.INTEGER(1), allowNull: false, defaultValue: null, primaryKey: false, autoIncrement: false, comment: null, field: "confirmed" }, fee_payment_id: { type: DataTypes.INTEGER(11), allowNull: true, defaultValue: null, primaryKey: false, autoIncrement: false, comment: null, field: "fee_payment_id" } }; const options = { tableName: "payments", comment: "", indexes: [] }; db["Payment"] = db.define("payments_model", attributes, options); ' value='1d6c3f68c6f9d992122e427a7cb24be13aa1e988'/>
path: root/src/routes/disable2fa/+server.js
blob: 237da445d9960c98fdc64a06eebe1ddf958f5e5e (plain) (tree)
1
2
3
4
5
6
7
8

                                        
                                                 
                                        
                                                                 


                                                 
import { auth, post } from '$lib/utils';

export async function PUT({ cookies, request }) {
	let body = await request.json();
	let res = await post('/disable2fa', body, auth(cookies));

	return new Response(JSON.stringify(res));
}