Skip to content

Commit

Permalink
refactor: UserInformation -> VendorInformation 네이밍 수정 #14
Browse files Browse the repository at this point in the history
  • Loading branch information
yim2627 committed Jan 27, 2022
1 parent c9eff4b commit aa37775
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 12 deletions.
8 changes: 4 additions & 4 deletions OpenMarket/OpenMarket.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
A62056C9279E7C3D00A0D967 /* PickerDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = A62056C8279E7C3D00A0D967 /* PickerDelegate.swift */; };
A62056CB279E80D300A0D967 /* AlertMessage.swift in Sources */ = {isa = PBXBuildFile; fileRef = A62056CA279E80D300A0D967 /* AlertMessage.swift */; };
A62056CD279EAB3B00A0D967 /* ProductDetailScrollView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A62056CC279EAB3B00A0D967 /* ProductDetailScrollView.swift */; };
A62056CF279FCEFE00A0D967 /* UserInformation.swift in Sources */ = {isa = PBXBuildFile; fileRef = A62056CE279FCEFE00A0D967 /* UserInformation.swift */; };
A62056CF279FCEFE00A0D967 /* VendorInformation.swift in Sources */ = {isa = PBXBuildFile; fileRef = A62056CE279FCEFE00A0D967 /* VendorInformation.swift */; };
A62056D1279FEAB600A0D967 /* NotificationKey.swift in Sources */ = {isa = PBXBuildFile; fileRef = A62056D0279FEAB600A0D967 /* NotificationKey.swift */; };
A62056D327A1086600A0D967 /* AlertActionMessage.swift in Sources */ = {isa = PBXBuildFile; fileRef = A62056D227A1086500A0D967 /* AlertActionMessage.swift */; };
A62056E027A12D1E00A0D967 /* ProductDetailImageSize.swift in Sources */ = {isa = PBXBuildFile; fileRef = A62056DF27A12D1E00A0D967 /* ProductDetailImageSize.swift */; };
Expand Down Expand Up @@ -90,7 +90,7 @@
A62056C8279E7C3D00A0D967 /* PickerDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PickerDelegate.swift; sourceTree = "<group>"; };
A62056CA279E80D300A0D967 /* AlertMessage.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AlertMessage.swift; sourceTree = "<group>"; };
A62056CC279EAB3B00A0D967 /* ProductDetailScrollView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProductDetailScrollView.swift; sourceTree = "<group>"; };
A62056CE279FCEFE00A0D967 /* UserInformation.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserInformation.swift; sourceTree = "<group>"; };
A62056CE279FCEFE00A0D967 /* VendorInformation.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VendorInformation.swift; sourceTree = "<group>"; };
A62056D0279FEAB600A0D967 /* NotificationKey.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NotificationKey.swift; sourceTree = "<group>"; };
A62056D227A1086500A0D967 /* AlertActionMessage.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AlertActionMessage.swift; sourceTree = "<group>"; };
A62056DF27A12D1E00A0D967 /* ProductDetailImageSize.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProductDetailImageSize.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -253,7 +253,7 @@
C9AC97DC279974CB00E5E10C /* RegisteredImageSize.swift */,
A62056CA279E80D300A0D967 /* AlertMessage.swift */,
A62056D227A1086500A0D967 /* AlertActionMessage.swift */,
A62056CE279FCEFE00A0D967 /* UserInformation.swift */,
A62056CE279FCEFE00A0D967 /* VendorInformation.swift */,
A62056D0279FEAB600A0D967 /* NotificationKey.swift */,
A62056DF27A12D1E00A0D967 /* ProductDetailImageSize.swift */,
);
Expand Down Expand Up @@ -618,7 +618,7 @@
A6D008F22796DF4B002FAE56 /* ProductImagePickerController.swift in Sources */,
A6A824552785BDE1006CE6DA /* URLCreator.swift in Sources */,
C995B2572796EC9900293651 /* ProductRegisterManager.swift in Sources */,
A62056CF279FCEFE00A0D967 /* UserInformation.swift in Sources */,
A62056CF279FCEFE00A0D967 /* VendorInformation.swift in Sources */,
C995B25B279703EE00293651 /* Notification+name.swift in Sources */,
A6A824572785DDD8006CE6DA /* ProductRegisterInformation.swift in Sources */,
A62056E027A12D1E00A0D967 /* ProductDetailImageSize.swift in Sources */,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
enum UserInformation {
enum VendorInformation {
static let vendorId = "dd0f9bb2-7215-11ec-abfa-0b4adeed0178"
static let secret = "R_WGJGz8CV^aa_V!"
static let name = "chacha"
Expand Down
8 changes: 4 additions & 4 deletions OpenMarket/OpenMarket/Network/APIService.swift
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ extension APIService {
return
}

var request = URLRequest(url: url, api: .productSecret(body: body, id: UserInformation.vendorId))
var request = URLRequest(url: url, api: .productSecret(body: body, id: VendorInformation.vendorId))
request.addValue("application/json", forHTTPHeaderField: "Content-Type")

let task = dataTask(request: request) { result in
Expand Down Expand Up @@ -132,7 +132,7 @@ extension APIService {
return
}

var request = URLRequest(url: url, api: .productRegister(body: body, id: UserInformation.vendorId))
var request = URLRequest(url: url, api: .productRegister(body: body, id: VendorInformation.vendorId))
request.addValue("multipart/form-data; boundary=\(boundary)", forHTTPHeaderField: "Content-Type")

let task = dataTask(request: request, completion: completion)
Expand All @@ -149,7 +149,7 @@ extension APIService {
return
}

let request = URLRequest(url: url, api: .productUpdate(body: body, id: UserInformation.vendorId))
let request = URLRequest(url: url, api: .productUpdate(body: body, id: VendorInformation.vendorId))

let task = dataTask(request: request) { result in
switch result {
Expand All @@ -171,7 +171,7 @@ extension APIService {
return
}

let request = URLRequest(url: url, api: .deleteProduct(id: UserInformation.vendorId))
let request = URLRequest(url: url, api: .deleteProduct(id: VendorInformation.vendorId))

let task = dataTask(request: request, completion: completion)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ private extension ProductDetailViewController {
func configNavigationBar() {
let manageButton = UIBarButtonItem(barButtonSystemItem: .action, target: self, action: #selector(didTapManageButton))

if UserInformation.name == productDetail.vendors?.name {
if VendorInformation.name == productDetail.vendors?.name {
self.navigationItem.setRightBarButton(manageButton, animated: true)
return
}
Expand Down Expand Up @@ -154,7 +154,7 @@ extension ProductDetailViewController {
guard let secret = secret else {
return
}
let productSecret = ProductSecret(secret: UserInformation.secret)
let productSecret = ProductSecret(secret: VendorInformation.secret)
api.retrieveProductSecret(productId: productDetail.id, secret: productSecret) { result in
switch result {
case .success(let password):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ class ProductRegisterManager {
let stockString = productInformationView.stockTextField.text ?? ""
let stock = Int(stockString) ?? 0

let productRegisterInformation = ProductRegisterInformation(name: name, descriptions: descriptions, price: price, currency: currency, discountedPrice: discountedPrice, stock: stock, secret: UserInformation.secret)
let productRegisterInformation = ProductRegisterInformation(name: name, descriptions: descriptions, price: price, currency: currency, discountedPrice: discountedPrice, stock: stock, secret: VendorInformation.secret)

return productRegisterInformation
}
Expand Down

0 comments on commit aa37775

Please sign in to comment.