Explorar o código

define app in the appropriate location

Kylie Jo Swistak %!s(int64=5) %!d(string=hai) anos
pai
achega
e2bf08bc3c
Modificáronse 1 ficheiros con 6 adicións e 0 borrados
  1. 6 0
      app/app_forms/image_app.rb

+ 6 - 0
app/app_forms/image_app.rb

@@ -20,6 +20,9 @@ class ImageApplication < ApplicationForm
   end
 
   def self.approve(event)
+    # Save app
+    app = event.message.embeds.first
+
     # Update image and find character
     image = ImageController.edit_image(app)
     character = Character.find(image.char_id)
@@ -44,6 +47,9 @@ class ImageApplication < ApplicationForm
   end
 
   def self.deny(event)
+    # Save app
+    app = event.message.embeds.first
+
     # Create App Rejection
     reply = BotResponse.new(
       embed: reject_app_embed(app, :image),