Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Added gitignore

  • Loading branch information...
commit 1058a3cf2f0dbbcb5b9eb67da169ef8a53600ae0 2 parents e750418 + 4ed985f
@toantran authored
View
18 coffee/repository/matches2.coffee
@@ -0,0 +1,18 @@
+baseDb = require('./base')
+baseRepo = new baseDb.repository('matches')
+
+{Db, ObjectId, Timestamp, Connection, Server, checkError, errorHandler, getDb} = baseDb
+
+exports.create = () ->
+ baseRepo.create.apply baseRepo, arguments
+exports.read = () ->
+ baseRepo.read.apply baseRepo, arguments
+exports.update = () ->
+ baseRepo.update.apply baseRepo, arguments
+exports.save = () ->
+ baseRepo.save.apply baseRepo, arguments
+exports.remove = () ->
+ baseRepo.remove.apply baseRepo, arguments
+exports.getById = () ->
+ baseRepo.getById.apply baseRepo, arguments
+exports.ObjectId = ObjectId
View
18 coffee/repository/news.coffee
@@ -0,0 +1,18 @@
+baseDb = require('./base')
+baseRepo = new baseDb.repository('news')
+
+{Db, ObjectId, Timestamp, Connection, Server, checkError, errorHandler, getDb} = baseDb
+
+exports.create = () ->
+ baseRepo.create.apply baseRepo, arguments
+exports.read = () ->
+ baseRepo.read.apply baseRepo, arguments
+exports.update = () ->
+ baseRepo.update.apply baseRepo, arguments
+exports.save = () ->
+ baseRepo.save.apply baseRepo, arguments
+exports.remove = () ->
+ baseRepo.remove.apply baseRepo, arguments
+exports.getById = () ->
+ baseRepo.getById.apply baseRepo, arguments
+exports.ObjectId = ObjectId
View
50 coffee/repository/teams2.coffee
@@ -0,0 +1,50 @@
+baseDb = require('./base')
+baseRepo = new baseDb.repository('teams')
+
+{Db, ObjectId, Timestamp, Connection, Server, checkError, errorHandler, getDb} = baseDb
+
+exports.create = () ->
+ baseRepo.create.apply baseRepo, arguments
+exports.read = () ->
+ baseRepo.read.apply baseRepo, arguments
+exports.update = () ->
+ baseRepo.update.apply baseRepo, arguments
+exports.save = () ->
+ baseRepo.save.apply baseRepo, arguments
+exports.remove = () ->
+ baseRepo.remove.apply baseRepo, arguments
+exports.getById = () ->
+ baseRepo.getById.apply baseRepo, arguments
+exports.ObjectId = ObjectId
+
+
+exports.removeChallenge = ( teamid, otherteamid, callback = ->) ->
+ console.assert teamid, 'teamid cannot be null'
+ throw 'teamid cannot be null' if not teamid
+ console.assert otherteamid, 'otherteamid cannot be null'
+ throw 'otherteamid cannot be null' if not otherteamid
+
+ teamid = new ObjectId(teamid) if typeof teamid is 'string'
+ otherteamid = new ObjectId(otherteamid) if typeof otherteamid is 'string'
+
+ findObj =
+ _id: teamid
+ removingLog =
+ type: 'challengeremoved'
+ data:
+ teamid: otherteamid
+ createdat: new Date()
+ updateObj =
+ $set:
+ updatedat: new Date()
+ $pull:
+ challenges:
+ teamid: otherteamid
+ $addToSet:
+ logs: removingLog
+
+ try
+ baseRepo.update findObj, updateObj, {}, callback
+ catch e
+ console.trace e
+ callback e
View
8 public/stylesheets/style.css
@@ -0,0 +1,8 @@
+body {
+ padding: 50px;
+ font: 14px "Lucida Grande", Helvetica, Arial, sans-serif;
+}
+
+a {
+ color: #00B7FF;
+}
View
3  public/stylesheets/style.less
@@ -58,6 +58,7 @@
.clear-float {
clear: both;
}
+<<<<<<< HEAD
.map-container {
width: 100%;
@@ -68,3 +69,5 @@
width: 100%;
height: 100%;
}
+=======
+>>>>>>> 1447554d9579db7439cc78d091ebc9563dd26626
View
36 repository/news.js
@@ -0,0 +1,36 @@
+(function() {
+ var Connection, Db, ObjectId, Server, Timestamp, baseDb, baseRepo, checkError, errorHandler, getDb;
+
+ baseDb = require('./base');
+
+ baseRepo = new baseDb.repository('news');
+
+ Db = baseDb.Db, ObjectId = baseDb.ObjectId, Timestamp = baseDb.Timestamp, Connection = baseDb.Connection, Server = baseDb.Server, checkError = baseDb.checkError, errorHandler = baseDb.errorHandler, getDb = baseDb.getDb;
+
+ exports.create = function() {
+ return baseRepo.create.apply(baseRepo, arguments);
+ };
+
+ exports.read = function() {
+ return baseRepo.read.apply(baseRepo, arguments);
+ };
+
+ exports.update = function() {
+ return baseRepo.update.apply(baseRepo, arguments);
+ };
+
+ exports.save = function() {
+ return baseRepo.save.apply(baseRepo, arguments);
+ };
+
+ exports.remove = function() {
+ return baseRepo.remove.apply(baseRepo, arguments);
+ };
+
+ exports.getById = function() {
+ return baseRepo.getById.apply(baseRepo, arguments);
+ };
+
+ exports.ObjectId = ObjectId;
+
+}).call(this);
View
5 views/index.jade
@@ -1,3 +1,4 @@
+<<<<<<< HEAD
.row
.span12
.map-container
@@ -5,3 +6,7 @@
script(type='text/javascript', src='http://maps.googleapis.com/maps/api/js?key=AIzaSyDt3Wg9EIXvoW5qpro4e-hl9sgarNTmEnE&sensor=false')
script(type='text/javascript', src='js/index.js')
+=======
+h1= title
+p Welcome to #{title}
+>>>>>>> 1447554d9579db7439cc78d091ebc9563dd26626
View
1  views/layout.jade
@@ -5,7 +5,6 @@
- var roles = []
- if (loggedIn)
roles = request.session.user.roles || []
-
!!! 5
html.nojs
Please sign in to comment.
Something went wrong with that request. Please try again.