//
//  SinglePointPasswordHttpPostCmd.m
//  MobilePortal
//
//  Created by caiyang on 2020/8/28.
//  Copyright © 2020 yin chen. All rights reserved.
//

#import "SinglePointPasswordHttpPostCmd.h"
#import "SinglePointPasswordHttpResult.h"

static NSString *kActionUrl1 = @"/Single/changePasswordByUsername";

@implementation SinglePointPasswordHttpPostCmd

-(instancetype)initWithVersion:(NSString *)version{
    if ([version isEqualToString:PHttpVersion_v1]) {
        return [[SinglePointPasswordHttpPostCmd alloc]initWithAuthorizationState:AuthorizationNull];
    }else{
        NSAssert(NO, @"Invalid version");
    }
    return nil;
}

- (instancetype)initWithAuthorizationState:(AuthorizationState)state{
    self = [super initWithAuthorizationState:state];
    if (self != nil) {
        self.result = [[SinglePointPasswordHttpResult alloc]init];
    }
    return self;
}

- (NSString *)getActionUrl{
    
    return kActionUrl1;
}


@end
NSString *const kHttpSinglePointPasswordHttpPostCmd_username = @"username";
NSString *const kHttpSinglePointPasswordHttpPostCmd_token = @"token";
NSString *const kHttpSinglePointPasswordHttpPostCmd_oldPassword = @"oldPassword";
NSString *const kHttpSinglePointPasswordHttpPostCmd_newPassword = @"newPassword";
