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

Commit fc8e573

Browse files
committed
Add placeholder API
Roughly covering the ECF portion of v3
1 parent 6568207 commit fc8e573

14 files changed

+180
-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: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
module API
2+
module Participants
3+
class ChangeScheduleController < ApplicationController
4+
include APISecurity
5+
6+
def update
7+
head(:ok)
8+
end
9+
end
10+
end
11+
end
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
module API
2+
module Participants
3+
class DeferController < ApplicationController
4+
include APISecurity
5+
6+
def update
7+
head(:ok)
8+
end
9+
end
10+
end
11+
end
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
module API
2+
module Participants
3+
class ResumeController < ApplicationController
4+
include APISecurity
5+
6+
def update
7+
head(:ok)
8+
end
9+
end
10+
end
11+
end
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
module API
2+
module Participants
3+
class TransfersController < ApplicationController
4+
include APISecurity
5+
6+
def index
7+
render(json: ["Transfer 1", "Transfer 2", "Transfer 3"].to_json)
8+
end
9+
end
10+
end
11+
end
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
module API
2+
module Participants
3+
class WithdrawController < ApplicationController
4+
include APISecurity
5+
6+
def update
7+
head(:ok)
8+
end
9+
end
10+
end
11+
end
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
module API
2+
class ParticipantsController < ApplicationController
3+
def index
4+
participants = Teacher.all.pluck(:id, :name)
5+
6+
render(json: participants.to_json)
7+
end
8+
end
9+
end
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
module API
2+
class SchoolsController < ActionController::Base
3+
include APISecurity
4+
5+
def index
6+
render(json: query.to_json)
7+
end
8+
9+
def show
10+
render(json: query.first.to_json)
11+
end
12+
13+
private
14+
15+
def query
16+
School.all.pluck(:id, :name)
17+
end
18+
end
19+
end

0 commit comments

Comments
 (0)