mirror of
https://gitlab.com/bmcgonag/get_my.git
synced 2026-03-26 15:58:50 +00:00
Putting a capital letter on the front of any product added.
This commit is contained in:
parent
c41857ab3e
commit
f02ea7d549
1 changed files with 6 additions and 2 deletions
|
|
@ -20,8 +20,10 @@ Meteor.methods({
|
|||
throw new Meteor.Error('You are not allowed to add products. Make sure you are logged in with valid user credentials.');
|
||||
}
|
||||
|
||||
let pname = prodName.charAt(0).toUpperCase() + prodName.slice(1);
|
||||
|
||||
return Products.insert({
|
||||
prodName: prodName,
|
||||
prodName: pname,
|
||||
prodOwner: this.userId,
|
||||
prodStore: prodStore,
|
||||
});
|
||||
|
|
@ -35,9 +37,11 @@ Meteor.methods({
|
|||
throw new Meteor.Error('You are not allowed to edit products. Make sure you are logged in with valid user credentials.');
|
||||
}
|
||||
|
||||
let pname = prodName.charAt(0).toUpperCase() + prodName.slice(1);
|
||||
|
||||
return Products.update({ _id: prodId }, {
|
||||
$set: {
|
||||
prodName: prodName,
|
||||
prodName: pname,
|
||||
prodStore: prodStore,
|
||||
}
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue