解决了Token与后端不匹配导致无法更新Mod的问题。

This commit is contained in:
Cold-Mint 2023-10-09 22:39:13 +08:00
parent b3a894912e
commit e31b26a317
2 changed files with 9 additions and 9 deletions

View File

@ -774,7 +774,7 @@ class ReleaseModActivity : BaseActivity<ActivityReleaseModBinding>() {
if (isUpdateMode) {
updateModWork(
modId,
account,
AppSettings.getValue(AppSettings.Setting.Token, ""),
modName,
modDescribe,
updateLog,
@ -795,7 +795,7 @@ class ReleaseModActivity : BaseActivity<ActivityReleaseModBinding>() {
if (isUpdateMode) {
updateModWork(
modId,
account,
AppSettings.getValue(AppSettings.Setting.Token, ""),
modName,
modDescribe,
updateLog,
@ -814,7 +814,7 @@ class ReleaseModActivity : BaseActivity<ActivityReleaseModBinding>() {
if (isUpdateMode) {
updateModWork(
modId,
account,
AppSettings.getValue(AppSettings.Setting.Token, ""),
modName,
modDescribe,
updateLog,
@ -837,7 +837,7 @@ class ReleaseModActivity : BaseActivity<ActivityReleaseModBinding>() {
if (isUpdateMode) {
updateModWork(
modId,
account,
AppSettings.getValue(AppSettings.Setting.Token, ""),
modName,
modDescribe,
updateLog,
@ -964,7 +964,7 @@ class ReleaseModActivity : BaseActivity<ActivityReleaseModBinding>() {
*/
fun updateModWork(
modId: String,
account: String,
token: String,
modName: String,
modDescribe: String,
updateLog: String,
@ -980,7 +980,7 @@ class ReleaseModActivity : BaseActivity<ActivityReleaseModBinding>() {
WebMod.instance.updateMod(AppSettings.getValue(AppSettings.Setting.AppID, ""), modId,
account,
token,
modName,
modDescribe,
updateLog,

View File

@ -971,7 +971,7 @@ class WebMod private constructor() {
* 升级模组
* @param appId String
* @param modId String
* @param account String
* @param token String
* @param modName String
* @param describe String
* @param tags String
@ -987,7 +987,7 @@ class WebMod private constructor() {
fun updateMod(
appId: String,
modId: String,
account: String,
token: String,
modName: String,
describe: String,
updateLog: String,
@ -1003,7 +1003,7 @@ class WebMod private constructor() {
val builder =
MultipartBody.Builder().setType(MultipartBody.FORM).addFormDataPart("appID", appId)
.addFormDataPart("modId", modId).addFormDataPart("updateLog", updateLog)
.addFormDataPart("account", account).addFormDataPart("modName", modName)
.addFormDataPart("token", token).addFormDataPart("modName", modName)
.addFormDataPart("describe", describe).addFormDataPart("tags", tags)
.addFormDataPart("versionName", versionName)
.addFormDataPart("unitNumber", unitNum.toString())