Browse Source

Update UserActivity w/jarvis object

master
sipp11 9 years ago
parent
commit
6eb239b452
  1. 4
      api/controllers/UserActivityController.js
  2. 9
      api/models/ObjReference.js
  3. 7
      api/models/ObjRevision.js
  4. 12
      api/models/UserActivity.js

4
api/controllers/UserActivityController.js

@ -45,7 +45,7 @@ module.exports = {
}
});
refQuery.limit(10).exec(function(err, items) {
refQuery.limit(10).populate('jarvisId').exec(function(err, items) {
if (err) {
res.send(400);
} else {
@ -68,7 +68,7 @@ module.exports = {
}
});
refQuery.limit(10).exec(function(err, items) {
refQuery.limit(10).populate('jarvisId').exec(function(err, items) {
if (err) {
res.send(400);
} else {

9
api/models/ObjReference.js

@ -8,7 +8,14 @@
module.exports = {
connection: 'jarvisBlackboard',
attributes: {
team: 'string',
bbApi: 'string',
type: {
type: 'string',
enum: ['student', 'employee', 'classroom']
},
key: 'integer',
latest: 'json'
}
};

7
api/models/ObjRevision.js

@ -8,7 +8,12 @@
module.exports = {
connection: 'jarvisBlackboard',
attributes: {
team: 'string',
date: 'datetime',
jarvisId: { model: 'ObjReference' },
bbApi: 'string',
delta: 'json',
current: 'json',
}
};

12
api/models/UserActivity.js

@ -8,7 +8,17 @@
module.exports = {
connection: 'jarvisBlackboard',
attributes: {
id: {
type: 'string',
unique: true
},
user: 'string',
user_id: 'integer',
verb: 'string',
team: 'string',
date: 'datetime',
jarvisId: { model: 'ObjReference' },
revision: { model: 'ObjRevision' }
}
};

Loading…
Cancel
Save