 creating = false
 kdockId = -1
 detail =
-  item: []
-  highspeed: []
+  items: []
+  highspeed: -1
   kdockId: -1
   largeFlag: false
   secretary: -1

    when '/kcsapi/api_get_member/kdock'
      return unless creating
      dock = body[kdockId]
      return if dock.api_item1 != detail.item[0] || dock.api_item2 != detail.item[1] || dock.api_item3 != detail.item[2] || dock.api_item4 != detail.item[3] || dock.api_item5 != detail.item[4]
      detail.shipId = api_created_ship_id
      creating = false
      try
        yield request.postAsync
          url: 'http://poi.0u0.moe/api/report/create_ship'
          form:
            data: JSON.stringify detail
      catch e
        console.error e
    when '/kcsapi/api_req_sortie/battleresult'
      try
        yield request.postAsync
          url: 'http://poi.0u0.moe/api/report/drop_ship'
          form:
            data: body.api_get_ship.api_ship_id
      catch e
        console.error e
module.exports =

{_, SERVER_HOSTNAME} = window
Promise = require 'bluebird'
async = Promise.coroutine
request = Promise.promisifyAll require 'request'
