Initial commit

This commit is contained in:
Brian McGonagill 2026-02-03 16:03:34 -06:00
parent 9ed5089508
commit 78e0e82449
16 changed files with 317 additions and 15 deletions

View file

@ -12,24 +12,24 @@ UpdateInfo.allow({
});
Meteor.methods({
'add.updateInfo' (updateObject) {
async 'add.updateInfo' (updateObject) {
check(updateObject, Object);
UpdateInfo.insertAsync({
return await UpdateInfo.insertAsync({
title: updateObject.title,
description: updateObject.description,
dateRelease: updateObject.date,
releaseLink: updateObject.link
});
},
'markUpdate.read' (updateId) {
async 'markUpdate.read' (updateId) {
check(updateId, String);
if (!this.userId) {
throw new Meteor.Error('You are not allowed to mark updates as read. Make sure you are logged in with valid user credentials.');
}
return UpdateInfo.updateAsync({ _id: updateId }, {
return await UpdateInfo.updateAsync({ _id: updateId }, {
$set: {
viewed: true
}