Skip to content

Commit

Permalink
Logout feature (#26)
Browse files Browse the repository at this point in the history
* [#187584914]added logout feature

* [starts #187584914] added logout feature

* [finishes#187584914] logout feature

* [delivers##187584914] updated readme & swagger.json

* [delivers##187584914] updated readme & swagger.json

* [deliveres #187584914] logout features completed

* [deliveres #187584914] logout features completed

* [delivers #187584914] finished logout feature
  • Loading branch information
solangeihirwe03 authored and AimePazzo committed Jun 6, 2024
1 parent dad2ece commit dac5a4c
Show file tree
Hide file tree
Showing 17 changed files with 83 additions and 344 deletions.
48 changes: 0 additions & 48 deletions .circleci/config.yml

This file was deleted.

41 changes: 0 additions & 41 deletions .eslintrc

This file was deleted.

18 changes: 0 additions & 18 deletions .github/workflows/blank.yml

This file was deleted.

31 changes: 1 addition & 30 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,30 +1 @@
# Build and Release Folders
bin-debug/
bin-release/
[Oo]bj/
[Bb]in/

# Other files and folders
.settings/

# Executables
*.swf
*.air
*.ipa
*.apk

# Project files, i.e. `.project`, `.actionScriptProperties` and `.flexProperties`
# should NOT be excluded as they contain compiler settings and other important
# information for Eclipse / Flash Builder.

#node modules folder
node_modules/

#environment variables
.env
coverage
.nyc_output
.vscode
.cache_ggshield
dist

node_modules
8 changes: 0 additions & 8 deletions .hintrc

This file was deleted.

1 change: 0 additions & 1 deletion .husky/pre-commit

This file was deleted.

7 changes: 0 additions & 7 deletions .sequelizerc

This file was deleted.

1 change: 0 additions & 1 deletion Dockerfile.database

This file was deleted.

13 changes: 0 additions & 13 deletions Dockerfile.server

This file was deleted.

22 changes: 0 additions & 22 deletions README.Docker.md

This file was deleted.

28 changes: 0 additions & 28 deletions docker-compose.yml

This file was deleted.

37 changes: 0 additions & 37 deletions src/databases/config/config.ts

This file was deleted.

45 changes: 0 additions & 45 deletions src/databases/config/db.config.ts

This file was deleted.

70 changes: 70 additions & 0 deletions src/databases/models/tokens.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
/* eslint-disable require-jsdoc */
import { Model, DataTypes, Sequelize } from "sequelize";

interface TokenAttributes {
id: number;
userId: number;
device: string;
accessToken: string;
createdAt: Date;
updatedAt: Date;
expiresAt: Date;
}

module.exports = (sequelize: Sequelize) => {
class Tokens extends Model<TokenAttributes> implements TokenAttributes {
declare id: number;
declare userId: number;
declare device: string;
declare accessToken: string;
declare createdAt: Date;
declare updatedAt: Date;
declare expiresAt: Date;
}

Tokens.init(
{
id: {
type: DataTypes.INTEGER,
autoIncrement: true,
primaryKey: true
},
userId: {
type: new DataTypes.INTEGER(),
allowNull: false
},
device: {
type: new DataTypes.STRING(280),
allowNull: false
},
accessToken: {
type: new DataTypes.STRING(280),
allowNull: false
},
createdAt: {
field: "createdAt",
type: DataTypes.DATE,
allowNull: false,
defaultValue: DataTypes.NOW
},
updatedAt: {
field: "updatedAt",
type: DataTypes.DATE,
allowNull: false,
defaultValue: DataTypes.NOW
},
expiresAt: {
type: DataTypes.DATE,
allowNull: false
}
},
{
sequelize,
tableName: "tokens",
timestamps: true,
modelName: "Tokens"
}
);

return Tokens;
};
2 changes: 1 addition & 1 deletion src/routes/authRouter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,4 @@ router.get(
googleAuth.authenticateWithGoogle);


export default router;
export default router;
Loading

0 comments on commit dac5a4c

Please sign in to comment.