Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fe#95/fix tables #112

Merged
merged 5 commits into from
Dec 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions backend/app/controllers/api/v1/admin/customers_controller.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
class Api::V1::Admin::CustomersController < ApplicationController
include ActionController::HttpAuthentication::Basic::ControllerMethods
http_basic_authenticate_with name: ENV['ADMIN_USERNAME'], password: ENV['ADMIN_PASSWORD']
def index
@customers = Customer.all

render json: @customers
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
class Api::V1::Admin::SubscribersController < ApplicationController
include ActionController::HttpAuthentication::Basic::ControllerMethods
http_basic_authenticate_with name: ENV['ADMIN_USERNAME'], password: ENV['ADMIN_PASSWORD']
def index
@subscribers = Subscriber.all

render json: @subscribers
end
end
2 changes: 1 addition & 1 deletion backend/db/seeds.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
require 'faker'


20.times do
10.times do
fn=Faker::Name.first_name
ln=Faker::Name.last_name
Subscriber.create(
Expand Down
Loading