Fix 'twenty connect|disconnect'

This commit is contained in:
0x1eef 2024-03-28 15:26:52 -03:00
parent 85d0280b8c
commit 68e25ac8c7
2 changed files with 6 additions and 3 deletions

View file

@ -15,9 +15,9 @@ class Twenty::Command::Connect < Twenty::Command
private
def run_command(options)
Twenty::Project.new(
Twenty::Project.create(
name: File.basename(Dir.getwd),
path: Dir.getwd
).save!
)
end
end

View file

@ -15,6 +15,9 @@ class Twenty::Command::Disconnect < Twenty::Command
private
def run_command(options)
warn "[twenty] disconnect..."
Twenty::Project
.where(path: Dir.getwd)
.first!
.destroy
end
end