Skip to content

Commit

Permalink
Merge pull request #112 from Lala0419/FE#95/fix-tables
Browse files Browse the repository at this point in the history
Fe#95/fix tables
  • Loading branch information
Lala0419 authored Dec 7, 2023
2 parents 5d180c9 + b44cd2e commit 66028e4
Show file tree
Hide file tree
Showing 10 changed files with 1,181 additions and 169 deletions.
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

0 comments on commit 66028e4

Please sign in to comment.