-
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.
* [#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
1 parent
dad2ece
commit dac5a4c
Showing
17 changed files
with
83 additions
and
344 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -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 |
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 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,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; | ||
}; |
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 |
---|---|---|
|
@@ -52,4 +52,4 @@ router.get( | |
googleAuth.authenticateWithGoogle); | ||
|
||
|
||
export default router; | ||
export default router; |
Oops, something went wrong.