-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update configuration and remove unused files
- Loading branch information
1 parent
3c10767
commit a508db4
Showing
53 changed files
with
3,941 additions
and
757 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
module.exports = { | ||
env: { | ||
browser: true, | ||
es2021: true, | ||
}, | ||
extends: "airbnb-base", | ||
overrides: [ | ||
{ | ||
env: { | ||
node: true, | ||
}, | ||
files: [".eslintrc.{js,cjs}"], | ||
parserOptions: { | ||
sourceType: "script", | ||
}, | ||
}, | ||
], | ||
parserOptions: { | ||
ecmaVersion: "latest", | ||
sourceType: "module", | ||
}, | ||
rules: { | ||
"no-console": 1, | ||
"class-methods-use-this": 0, | ||
"comma-dangle": 0, | ||
"max-len": 0, | ||
"object-curly-newline": 0, | ||
"consistent-return": 0, | ||
"prefer-const": 0, | ||
quotes: ["error", "double"], | ||
semi: ["error", "never"], | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,5 +4,5 @@ | |
"tabWidth": 2, | ||
"trailingComma": "es5", | ||
"tailwindcss": {}, | ||
"printWidth": 120 | ||
"printWidth": 140 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"recommendations": ["github.copilot-chat"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
/* eslint-disable lines-around-directive */ | ||
/* eslint-disable strict */ | ||
/* eslint-disable no-unused-vars */ | ||
"use strict" | ||
|
||
/** @type {import('sequelize-cli').Migration} */ | ||
module.exports = { | ||
async up(queryInterface, Sequelize) { | ||
await queryInterface.changeColumn("Users", "id", { | ||
type: Sequelize.UUID, | ||
defaultValue: Sequelize.UUIDV4, | ||
allowNull: false, | ||
primaryKey: true, | ||
}) | ||
}, | ||
|
||
async down(queryInterface, Sequelize) { | ||
await queryInterface.changeColumn("Users", "id", { | ||
type: Sequelize.INTEGER, | ||
allowNull: false, | ||
autoIncrement: true, | ||
primaryKey: true, | ||
}) | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import { DataTypes } from "sequelize" | ||
import sequelize from "../config/database" | ||
|
||
// storing information used in 2-factor authentication (2FA) | ||
const AuthFactor = sequelize.define("AuthFactor", { | ||
id: { | ||
type: DataTypes.UUID, | ||
primaryKey: true, | ||
defaultValue: DataTypes.UUIDV4, | ||
}, | ||
factor: { | ||
type: DataTypes.STRING, | ||
allowNull: false, | ||
}, | ||
secret: { | ||
type: DataTypes.STRING, | ||
allowNull: false, | ||
}, | ||
verified: { | ||
type: DataTypes.BOOLEAN, | ||
allowNull: false, | ||
defaultValue: false, | ||
}, | ||
verifiedAt: { | ||
type: DataTypes.DATE, | ||
allowNull: true, | ||
}, | ||
}) | ||
|
||
export default AuthFactor |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import { DataTypes } from "sequelize" | ||
import sequelize from "../config/database" | ||
|
||
const Capability = sequelize.define("Capability", { | ||
id: { | ||
type: DataTypes.INTEGER, // or DataTypes.UUID | ||
primaryKey: true, | ||
autoIncrement: true, // set to false if using UUID | ||
}, | ||
name: { | ||
type: DataTypes.STRING, | ||
allowNull: false, | ||
unique: true, | ||
}, | ||
description: { | ||
type: DataTypes.STRING, | ||
allowNull: true, | ||
}, | ||
}) | ||
|
||
export default Capability |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import { DataTypes } from "sequelize" | ||
import sequelize from "../config/database" | ||
|
||
const Role = sequelize.define( | ||
"Role", | ||
{ | ||
id: { | ||
type: DataTypes.INTEGER, | ||
primaryKey: true, | ||
autoIncrement: true, | ||
}, | ||
name: { | ||
type: DataTypes.STRING, | ||
allowNull: false, | ||
unique: true, | ||
}, | ||
description: { | ||
type: DataTypes.STRING, | ||
allowNull: true, | ||
}, | ||
}, | ||
{ | ||
indexes: [ | ||
{ | ||
unique: true, | ||
fields: ["name"], | ||
}, | ||
], | ||
} | ||
) | ||
|
||
export default Role |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { DataTypes } from "sequelize" | ||
import sequelize from "../config/database" | ||
|
||
const RoleCapability = sequelize.define("Role_Capability", { | ||
id: { | ||
type: DataTypes.INTEGER, | ||
primaryKey: true, | ||
autoIncrement: true, | ||
}, | ||
}) | ||
|
||
export default RoleCapability |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import { DataTypes } from "sequelize" | ||
import sequelize from "../config/database" | ||
|
||
const Token = sequelize.define("Token", { | ||
id: { | ||
type: DataTypes.UUID, | ||
primaryKey: true, | ||
defaultValue: DataTypes.UUIDV4, | ||
}, | ||
token: { | ||
type: DataTypes.STRING(1000), | ||
allowNull: false, | ||
}, | ||
expires: { | ||
type: DataTypes.DATE, | ||
allowNull: false, | ||
}, | ||
blacklisted: { | ||
type: DataTypes.BOOLEAN, | ||
allowNull: false, | ||
defaultValue: false, | ||
}, | ||
}) | ||
|
||
export default Token |
Oops, something went wrong.