mirror of
https://github.com/ToolJet/ToolJet
synced 2026-05-06 06:48:21 +00:00
16 lines
415 B
Ruby
16 lines
415 B
Ruby
class VersionsController < ApplicationController
|
|
def create
|
|
@app = App.find params[:app_id]
|
|
name = params[:version]['versionName']
|
|
AppVersion.create(app: @app, name: name)
|
|
end
|
|
|
|
def index
|
|
@versions = AppVersion.where(app_id: params['app_id']).order('created_at desc')
|
|
end
|
|
|
|
def update
|
|
@version = AppVersion.find params[:id]
|
|
@version.update(definition: params[:definition])
|
|
end
|
|
end
|