Support Global Application (#231)
Co-authored-by: AceDataCloud <office@acedata.cloud>
This commit is contained in:
1 parent
4c38327f16
commit
55482163d2
63 files changed
+2697
-2719
No files matched your search
@@ -6,7 +6,6 @@ import { IApplication, ICredential, IKlingConfig, IKlingTask, IService } from '@
|
||||
import { Status } from '@/models/common';
|
||||
import { KLING_SERVICE_ID } from '@/constants';
|
||||
import { mergeAndSortLists } from '@/utils/merge';
|
||||
import { getFinalApplication } from '@/utils';
|
||||
|
||||
export const resetAll = ({ commit }: ActionContext<IKlingState, IRootState>): void => {
|
||||
commit('resetAll');
|
||||
@@ -95,14 +94,6 @@ export const getApplications = async ({
|
||||
});
|
||||
state.status.getApplications = Status.Success;
|
||||
commit('setApplications', applications.items);
|
||||
const finalApplication = getFinalApplication(applications.items, currentApplication);
|
||||
if (finalApplication) {
|
||||
console.debug('set final application', finalApplication, finalApplication?.type);
|
||||
await dispatch('setApplication', finalApplication);
|
||||
} else {
|
||||
console.debug('set application undefined', undefined);
|
||||
commit('setApplication', undefined);
|
||||
}
|
||||
return applications.items;
|
||||
} catch (error) {
|
||||
console.error('get applications failed', error);
|
||||
|
||||
Reference in new issue
Block a user