feat: add promoter payouts controller and routes

This commit is contained in:
kbe
2025-09-16 23:52:49 +02:00
parent 0399761fb3
commit d922d7304d
9 changed files with 41 additions and 7 deletions

View File

@@ -0,0 +1,10 @@
class Promoter::PayoutsController < ApplicationController
def index
end
def show
end
def create
end
end

View File

@@ -0,0 +1,2 @@
module Promoter::PayoutsHelper
end

View File

@@ -0,0 +1,2 @@
<h1>Promoter::Payouts#create</h1>
<p>Find me in app/views/promoter/payouts/create.html.erb</p>

View File

@@ -0,0 +1,2 @@
<h1>Promoter::Payouts#index</h1>
<p>Find me in app/views/promoter/payouts/index.html.erb</p>

View File

@@ -0,0 +1,2 @@
<h1>Promoter::Payouts#show</h1>
<p>Find me in app/views/promoter/payouts/show.html.erb</p>

View File

@@ -78,6 +78,9 @@ Rails.application.routes.draw do
# === Promoter Routes ===
namespace :promoter do
get "payouts/index"
get "payouts/show"
get "payouts/create"
resources :events do
member do
patch :publish

View File

@@ -52,7 +52,8 @@ class DeviseCreateUsers < ActiveRecord::Migration[8.0]
# Add onboarding check on user model
t.boolean :onboarding_completed, default: false, null: false
# add_column :users, :stripe_connected_account_id, :string
# Link user to Stripe account for promoter payout
t.string :stripe_connected_account_id
t.timestamps null: false
end

View File

@@ -1,6 +0,0 @@
class AddPayoutFieldsToEvents < ActiveRecord::Migration[8.0]
def change
add_column :events, :payout_requested_at, :datetime
add_column :events, :payout_status, :integer
end
end

View File

@@ -0,0 +1,18 @@
require "test_helper"
class Promoter::PayoutsControllerTest < ActionDispatch::IntegrationTest
test "should get index" do
get promoter_payouts_index_url
assert_response :success
end
test "should get show" do
get promoter_payouts_show_url
assert_response :success
end
test "should get create" do
get promoter_payouts_create_url
assert_response :success
end
end