Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug fixes #7

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 3 additions & 8 deletions snippets/snippets.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{
// GENERICS
"generate function": {
"prefix": ["mxf", "fhelper"],
"body": [
@@ -28,7 +27,7 @@
"$1: {",
"\ttype: '$2',",
"\trequired: ${3:true},",
"\tdefault: ${0:null},",
"\tdefaultTo: ${0:null},",
"}"
],
"description": "This is an input template"
@@ -45,7 +44,6 @@
"description": "This is an exit template"
},

// ROUTES SNIPPETS
"get route": {
"prefix": ["gr", "getroute"],
"body": "'GET /$1': '$2/$0'",
@@ -70,7 +68,6 @@
"description": "A template for patch route"
},

// ATTRIBUTES SNIPPETS
"boolean attributes": {
"prefix": ["battr", "booleanattribute"],
"body": [
@@ -108,15 +105,13 @@
"description": "A template for boolean attribute"
},

// REQUEST SNIPPETS
"unpack request body": {
"prefix": ["rb", "rbody"],
"body": "const { $1, $0 } = this.req.body",
"description": "To unpack req.body much faster"
},


// WATERLINE SNIPPETS

"add to collection": {
"prefix": ["atc", "addtocollection"],
@@ -172,13 +167,13 @@

"create bulk object": {
"prefix": ["cb", "createbulk"],
"body": "await $1.createEach({ $2: $3 }, { $4: $0 }).fetch()",
"body": "await $1.createEach([{ $2: $3 }, { $4: $0 }]).fetch()",
"description": "To create bulk objs"
},

"create bulk object and fetch": {
"prefix": ["cbf", "createbulkfetch"],
"body": "let $1 = await $2.createEach({ $3: $4 }, { $5: $0 }).fetch()",
"body": "let $1 = await $2.createEach([{ $3: $4 }, { $5: $0 }]).fetch()",
"description": "To create bulk objs and fetch"
},