Skip to content
This repository has been archived by the owner on Oct 3, 2019. It is now read-only.

Commit

Permalink
#37 listando horarios por semana
Browse files Browse the repository at this point in the history
Signed-off-by: Beatriz Hanae <beatriz.hanae@gmail.com>
Signed-off-by: Ezequiel de Oliveira <ezequiel1de1oliveira@gmail.com>

Co-Authored-by: Beatriz Hanae <beatriz.hanae@gmail.com>
Co-Authored-by: Ezequiel de Oliveira <ezequiel1de1oliveira@gmail.com>
  • Loading branch information
EzequielDeOliveira and BeatrizHanae committed May 4, 2018
1 parent d54340e commit eb4a404
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
12 changes: 3 additions & 9 deletions Schedule/Client/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,24 +20,18 @@ module.exports = function api(options) {
},respond)
});

this.add('role:api,path:listSchedule', function(msg, respond){
this.act('role:schedule, cmd:listSchedule',{}, respond)

});

this.add('init:api', function (msg, respond) {
this.act('role:web', {
routes: {
prefix: '/api/schedule',
pin: 'role:api,path:*',
map: {
create: { POST: true },
listWeek: {GET : true},
listSchedule: {GET: true}
listWeek: {GET : true}
}
}
},respond)

})


Expand All @@ -48,4 +42,4 @@ module.exports = function api(options) {



}
}
2 changes: 1 addition & 1 deletion Schedule/Server/schedule.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ seneca()

var week = msg.week;
var schedule = this.make('schedule');
schedule.load$(week, function (error,schedule){
schedule.list$({week}, function (error,schedule){
respond(null,schedule);
});
})
Expand Down

0 comments on commit eb4a404

Please sign in to comment.