2021-04-01 10:59:27 +00:00
|
|
|
class AppsController < ApplicationController
|
2021-04-05 07:49:48 +00:00
|
|
|
|
|
|
|
|
def index
|
|
|
|
|
@apps = App.where(organization: @current_user.organization)
|
|
|
|
|
end
|
2021-04-02 11:09:35 +00:00
|
|
|
|
2021-04-01 10:59:27 +00:00
|
|
|
def create
|
|
|
|
|
@app = App.create({ name: 'Untitled app', organization: @current_user.organization })
|
|
|
|
|
end
|
2021-04-02 11:09:35 +00:00
|
|
|
|
|
|
|
|
def show
|
|
|
|
|
@app = App.find params[:id]
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
def update
|
2021-04-05 12:07:29 +00:00
|
|
|
@app = App.find params[:id]
|
|
|
|
|
@app.update(definition: params[:definition], name: params[:name])
|
2021-04-02 11:09:35 +00:00
|
|
|
end
|
2021-04-01 10:59:27 +00:00
|
|
|
end
|