mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
fix: adressed comments in methods.js in scaffolds
This commit is contained in:
@@ -1,25 +1,25 @@
|
||||
import { Meteor } from 'meteor/meteor'
|
||||
import { Meteor } from 'meteor/meteor';
|
||||
import { $$UpperName$$Collection } from './collection';
|
||||
|
||||
export const save$$UpperName$$ = async (data) => {
|
||||
return await $$UpperName$$Collection.insertAsync({ ...data });
|
||||
export function create$$UpperName$$(data) {
|
||||
return $$UpperName$$Collection.insertAsync({ ...data });
|
||||
}
|
||||
|
||||
export const update$$UpperName$$ = async (_id, data) => {
|
||||
return await $$UpperName$$Collection.updateAsync(_id, { ...data });
|
||||
export function update$$UpperName$$(_id, data) {
|
||||
return $$UpperName$$Collection.updateAsync(_id, { ...data });
|
||||
}
|
||||
|
||||
export const remove$$UpperName$$ = async (_id) => {
|
||||
return await $$UpperName$$Collection.removeAsync(_id);
|
||||
export function remove$$UpperName$$(_id) {
|
||||
return $$UpperName$$Collection.removeAsync(_id);
|
||||
}
|
||||
|
||||
export const find$$UpperName$$ById = async (_id) => {
|
||||
return await $$UpperName$$Collection.findOneAsync(_id);
|
||||
export function find$$UpperName$$ById(_id) {
|
||||
return $$UpperName$$Collection.findOneAsync(_id);
|
||||
}
|
||||
|
||||
Meteor.methods({
|
||||
save$$UpperName$$,
|
||||
update$$UpperName$$,
|
||||
remove$$UpperName$$,
|
||||
find$$UpperName$$ById
|
||||
'$$UpperName$$.create': create$$UpperName$$,
|
||||
'$$UpperName$$.update': update$$UpperName$$,
|
||||
'$$UpperName$$.remove': remove$$UpperName$$,
|
||||
'$$UpperName$$.find': find$$UpperName$$ById
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user