소스 검색

define app in the appropriate location

Kylie Jo Swistak 5 년 전
부모
커밋
e2bf08bc3c
1개의 변경된 파일6개의 추가작업 그리고 0개의 파일을 삭제
  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),