Skip to content
This repository was archived by the owner on Mar 28, 2024. It is now read-only.

Commit cf747d7

Browse files
committed
Add sample ECF API
1 parent 6568207 commit cf747d7

19 files changed

+267
-19
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
module API
2+
class DeliveryPartnersController < ActionController::Base
3+
include APISecurity
4+
5+
def index
6+
render(
7+
json: [
8+
{ id: 1, name: "Fake delivery partner 1" },
9+
{ id: 2, name: "Fake delivery partner 2" }
10+
].to_json
11+
)
12+
end
13+
14+
def show
15+
render({ id: 1, name: "Fake delivery partner 1" }.to_json)
16+
end
17+
end
18+
end
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
module API
2+
module ParticipantDeclarations
3+
class VoidsController < ApplicationController
4+
include APISecurity
5+
6+
def update
7+
head(:ok)
8+
end
9+
end
10+
end
11+
end
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
module API
2+
class ParticipantDeclarationsController < ActionController::Base
3+
include APISecurity
4+
5+
def index
6+
render(json: [{ id: 1 }].to_json)
7+
end
8+
9+
def show
10+
render(json: { id: 1 }.to_json)
11+
end
12+
end
13+
end
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
module API
2+
module Participants
3+
module ECF
4+
class ChangeScheduleController < ApplicationController
5+
include APISecurity
6+
7+
def update
8+
head(:ok)
9+
end
10+
end
11+
end
12+
end
13+
end
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
module API
2+
module Participants
3+
module ECF
4+
class DeferController < ApplicationController
5+
include APISecurity
6+
7+
def update
8+
head(:ok)
9+
end
10+
end
11+
end
12+
end
13+
end
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
module API
2+
module Participants
3+
module ECF
4+
class ResumeController < ApplicationController
5+
include APISecurity
6+
7+
def update
8+
head(:ok)
9+
end
10+
end
11+
end
12+
end
13+
end
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
module API
2+
module Participants
3+
module ECF
4+
class TransfersController < ApplicationController
5+
include APISecurity
6+
7+
def index
8+
render(json: ["Transfer 1", "Transfer 2", "Transfer 3"].to_json)
9+
end
10+
end
11+
end
12+
end
13+
end
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
module API
2+
module Participants
3+
module ECF
4+
class WithdrawController < ApplicationController
5+
include APISecurity
6+
7+
def update
8+
head(:ok)
9+
end
10+
end
11+
end
12+
end
13+
end
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
module API
2+
module Participants
3+
class ECFController < ApplicationController
4+
include APISecurity
5+
6+
def index
7+
render(json: Teacher.ecf.pluck(:id, :name).to_json)
8+
end
9+
10+
def show
11+
teacher = Teacher.select(:id, :name).ecf.find(params[:id])
12+
13+
render(json: teacher.to_json)
14+
end
15+
end
16+
end
17+
end
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
module API
2+
module Participants
3+
module Mentors
4+
class UnfundedController < ApplicationController
5+
include APISecurity
6+
7+
def index
8+
render(json: ["Unfunded mentor 1", "Unfunded mentor 2", "Unfunded mentor 3"].to_json)
9+
end
10+
end
11+
end
12+
end
13+
end

0 commit comments

Comments
 (0)