26 lines
609 B
Swift
26 lines
609 B
Swift
//
|
|
// SRUserApi.swift
|
|
// SynthReel
|
|
//
|
|
// Created by 湖北秦九 on 2025/11/13.
|
|
// Copyright © 2025 SR. All rights reserved.
|
|
//
|
|
|
|
import Foundation
|
|
import Alamofire
|
|
|
|
|
|
struct SRUserApi {
|
|
|
|
static func requestUserInfo() async -> SRUserInfo? {
|
|
|
|
await withCheckedContinuation { continuation in
|
|
var param = SRNetwork.Parameters(path: "/customer/info")
|
|
param.method = .get
|
|
SRNetwork.request(parameters: param) { (response: SRNetwork.Response<SRUserInfo>) in
|
|
continuation.resume(returning: response.data)
|
|
}
|
|
}
|
|
}
|
|
}
|