OSDN Git Service

staticプロパティをインスタンスプロパティに変更
[kcd/KCD.git] / KCD / UpdateQuestListCommand.swift
1 //
2 //  UpdateQuestListCommand.swift
3 //  KCD
4 //
5 //  Created by Hori,Masaki on 2017/01/08.
6 //  Copyright © 2017年 Hori,Masaki. All rights reserved.
7 //
8
9 import Cocoa
10
11 final class UpdateQuestListCommand: JSONCommand {
12     
13     override func execute() {
14         
15         let store = ServerDataStore.oneTimeEditor()
16         store.sync {
17             
18             self.parameter["api_quest_id"]
19                 .int
20                 .flatMap(store.quest(by:))
21                 .map {
22                     
23                     $0.progress_flag = 0
24                     $0.state = 1
25             }
26         }
27     }
28 }