mumuki-classroom 9.0.0 → 9.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ac568f5becdd6dc75713073064b35513e4cbeac66310e1dbcbd4208b78d7c626
4
- data.tar.gz: 230b37467f970f8895d05d1cd6a07e7cca74aef9fa69863a0ece634f334f1b73
3
+ metadata.gz: 758f9c2cad27a3521fd21607d251b73ba1dccf289d92bb316c3a4b05649e154a
4
+ data.tar.gz: d7e093105fb0bb1849bf716382d248ab4417a5779d8786d668312b261cbc7010
5
5
  SHA512:
6
- metadata.gz: '0855b05d9d07b5f5dc7f4a9281b7ab2d3df139bebe014e931598fa07fafe9f1ba253417eec636421fa7a11a4e9e1cf721d528d9900040fb08a2d8f53abe36735'
7
- data.tar.gz: 141547e161f22b64a018341ec195b2b81dc36142cf94ca052276fd003541d5f63c922d17df9e60919bccb02d4a70b114be5f62fe4c7b3cc7fc837dd8197fd6f0
6
+ metadata.gz: 18e0f05f9cd7b0b7063de7388be63a6bd3f74aed8ca28539c12ee389b9641a93a623ef96461c2156ef61b65a857cfc53fab36e66040183fc3da1f1b25f48408d
7
+ data.tar.gz: 7e4a6e42039d6866b1aa57d38892aa47b53d437856d9a670008ef139a275b9a379dfb0d93b02843faf02c160aafe1f8fa0335e5872531c9de03c09eb6bfad33c
@@ -1,8 +1,18 @@
1
1
  class Mumuki::Classroom::App < Sinatra::Application
2
2
  Mumukit::Platform.map_organization_routes!(self) do
3
+ helpers do
4
+ def list_teachers(matcher)
5
+ authorize! :headmaster
6
+ {teachers: Mumuki::Classroom::Teacher.where(matcher).as_json}
7
+ end
8
+ end
9
+
10
+ get '/teachers' do
11
+ list_teachers with_organization
12
+ end
13
+
3
14
  get '/courses/:course/teachers' do
4
- authorize! :headmaster
5
- {teachers: Mumuki::Classroom::Teacher.where(with_organization_and_course).as_json}
15
+ list_teachers with_organization_and_course
6
16
  end
7
17
 
8
18
  post '/courses/:course/teachers' do
@@ -1,5 +1,5 @@
1
1
  module Mumuki
2
2
  module Classroom
3
- VERSION = '9.0.0'
3
+ VERSION = '9.0.1'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mumuki-classroom
3
3
  version: !ruby/object:Gem::Version
4
- version: 9.0.0
4
+ version: 9.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Franco Bulgarelli
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-03-04 00:00:00.000000000 Z
11
+ date: 2021-03-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails