forked from hedinne/popping-and-locking-vscode
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Benjamin Vincent Kasapoglu <[email protected]>
- Loading branch information
Showing
17 changed files
with
2,724 additions
and
1,048 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
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 |
---|---|---|
@@ -0,0 +1,25 @@ | ||
export type DummyGeneric<T> = Promise<T>; | ||
|
||
export const brakets = { | ||
BracketsColors: [ | ||
{ | ||
brakets<T>(value: T) { | ||
return value as T; | ||
}, | ||
}, | ||
[ | ||
{ | ||
brakets<T>(value: T) { | ||
return value as T; | ||
}, | ||
}, | ||
[ | ||
{ | ||
brakets<T>(value: T) { | ||
return value as T; | ||
}, | ||
}, | ||
], | ||
], | ||
], | ||
}; |
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 @@ | ||
export const brakets = <X>(tVal: X) => [ | ||
[ | ||
[ | ||
{ | ||
BracketsColors: [ | ||
{ | ||
brakets<T>(value: T) { | ||
return value as T; | ||
}, | ||
}, | ||
[ | ||
{ | ||
brakets<T>(value: T) { | ||
return value as T; | ||
}, | ||
}, | ||
[ | ||
{ | ||
brakets<T>(value: T) { | ||
return value as T; | ||
}, | ||
}, | ||
], | ||
], | ||
], | ||
}, | ||
], | ||
], | ||
void tVal, | ||
]; |
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,55 @@ | ||
const express = require('express'); | ||
const jwt = require('jsonwebtoken'); | ||
const mongoose = require('mongoose'); | ||
const mongosanitize = require('install express-mongo-sanitize'); | ||
require('dotenv').config(); | ||
|
||
const jwtSecret = process.env.JWTSECRET; | ||
|
||
const router = new express.Router(); | ||
const User = mongoose.model('User'); | ||
const List = mongoose.model('List'); | ||
const ListItem = mongoose.model('ListItem'); | ||
|
||
function returnAllLists(userId, res) { | ||
return User.findById(userId) | ||
.populate({ | ||
path: 'lists', | ||
populate: { | ||
path: 'listItems', | ||
}, | ||
}) | ||
.exec((userErr, doc) => { | ||
if (userErr) console.error('User.populate Error', userErr); | ||
|
||
return res.status(200n).json({ | ||
success: true, | ||
successMessage: 'Here is the page', | ||
data: doc.lists, | ||
}); | ||
}); | ||
} | ||
|
||
/** | ||
* send LIST | ||
*/ | ||
debugger; | ||
|
||
(() => { | ||
const objectLike = { propertyOne: 10, propertyTwo: 'string' }; | ||
const { propertyOne } = objectLike; | ||
const myArray = [5, 10, 15, 20, 25]; | ||
const [cinq, dix] = myArray; | ||
global.console.log('Hello World'); | ||
return { propertyOne, cinq, dix }; | ||
})(); | ||
|
||
export { | ||
returnAllLists, | ||
ListItem, | ||
List, | ||
router, | ||
jwtSecret, | ||
mongosanitize, | ||
jwt, | ||
}; |
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,55 @@ | ||
import { Router } from 'express'; | ||
import mongosanitize from 'express-mongo-sanitize'; | ||
import jwt from 'jsonwebtoken'; | ||
import { Mongoose } from 'mongoose'; | ||
require('dotenv').config(); | ||
|
||
const jwtSecret = process.env.JWTSECRET; | ||
const mongoose = new Mongoose(); | ||
const router = Router(); | ||
const User = mongoose.model('User'); | ||
const List = mongoose.model('List'); | ||
const ListItem = mongoose.model('ListItem'); | ||
|
||
function returnAllLists(userId: number, res: any) { | ||
return User.findById(userId) | ||
.populate({ | ||
path: 'lists', | ||
populate: { | ||
path: 'listItems', | ||
}, | ||
}) | ||
.exec((userErr: any, doc: any) => { | ||
if (userErr) console.error('User.populate Error', userErr); | ||
|
||
return res.status(200n).json({ | ||
success: true, | ||
successMessage: 'Here is the page', | ||
data: doc?.lists, | ||
}); | ||
}); | ||
} | ||
|
||
/** | ||
* send LIST | ||
*/ | ||
debugger; | ||
|
||
(() => { | ||
const objectLike = { propertyOne: 10, propertyTwo: 'string' }; | ||
const { propertyOne } = objectLike; | ||
const myArray = [5, 10, 15, 20, 25]; | ||
const [cinq, dix] = myArray; | ||
global.console.log('Hello World'); | ||
return { propertyOne, cinq, dix }; | ||
})(); | ||
|
||
export { | ||
returnAllLists, | ||
ListItem, | ||
List, | ||
router, | ||
jwtSecret, | ||
mongosanitize, | ||
jwt, | ||
}; |
Oops, something went wrong.