mirror of
https://github.com/ragestudio/comty.git
synced 2025-06-09 02:24:16 +00:00
30 lines
889 B
Plaintext
Executable File
30 lines
889 B
Plaintext
Executable File
{
|
|
"[schema-21] New api v3 based functions": {
|
|
"scope": "javascript",
|
|
"prefix": "newApiFunctional21",
|
|
"description": "Create a new functional core module with default schema for ycore-schema21",
|
|
"body": [
|
|
"import verbosity from 'core/libs/verbosity'",
|
|
"import handle from 'core/libs/errorhandler'",
|
|
"import { notify } from 'core/libs/ui'",
|
|
"import settings from 'core/libs/settings'",
|
|
"import endpoints from 'config/endpoints'",
|
|
"import { v3_model } from 'core/libs'",
|
|
"",
|
|
"export function ${1:NewFunction}(payload, callback){",
|
|
"\tif (!payload) return false",
|
|
"\tconst { data } = payload",
|
|
"\t\t",
|
|
"\treturn callback(false, null)",
|
|
"}",
|
|
"",
|
|
"export const ${2:ObjectFunction} = {",
|
|
"\tsomething: (payload, callback) => {",
|
|
"\t\treturn callback(false, null)",
|
|
"\t}",
|
|
"}",
|
|
"",
|
|
"export default ${1:NewFunction}",
|
|
]
|
|
}
|
|
} |