 	tx.query.sync(tx,
 		"DELETE FROM items WHERE owner = $1",
 		[ character_id ])
-	
+
 	tx.commit.sync(tx)
 	return {
 		result: 'ok'

			result: 'fail'
			reason: "character ##{character_id} of user ##{user_id} not found"
		}
	
	unless force
		res = tx.query.sync(tx,
			"SELECT battle FROM battle_participants WHERE character_id = $1",

# Removes character
exports.deleteCharacter = ((dbConnection, user_id, character_id, force=false) ->
	tx = transaction dbConnection

	res = tx.query.sync(tx,
		"DELETE FROM characters WHERE id = $1 AND player = $2",
		[ character_id, user_id ])
