mirror of
				https://github.com/mealie-recipes/mealie.git
				synced 2025-10-30 17:53:31 -04:00 
			
		
		
		
	refactor: ♻️ rewrite migrations frontend/backend (#841)
* refactor(frontend): ♻️ rewrite migrations UI * refactor(backend): ♻️ rewrite recipe migrations * remove vue-demi Co-authored-by: hay-kot <hay-kot@pm.me>
This commit is contained in:
		
							
								
								
									
										27
									
								
								frontend/api/class-interfaces/group-migrations.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										27
									
								
								frontend/api/class-interfaces/group-migrations.ts
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,27 @@ | ||||
| import { BaseAPI } from "../_base"; | ||||
| import { ReportSummary } from "./group-reports"; | ||||
|  | ||||
| const prefix = "/api"; | ||||
|  | ||||
| export type SupportedMigration = "nextcloud" | "chowdown"; | ||||
|  | ||||
| export interface MigrationPayload { | ||||
|   migrationType: SupportedMigration; | ||||
|   archive: File; | ||||
| } | ||||
|  | ||||
| const routes = { | ||||
|   base: `${prefix}/groups/migrations`, | ||||
| }; | ||||
|  | ||||
| export class GroupMigrationApi extends BaseAPI { | ||||
|   async startMigration(payload: MigrationPayload) { | ||||
|     const form = new FormData(); | ||||
|     form.append("migration_type", payload.migrationType); | ||||
|     form.append("archive", payload.archive); | ||||
|  | ||||
|     console.log(form); | ||||
|  | ||||
|     return await this.requests.post<ReportSummary>(routes.base, form); | ||||
|   } | ||||
| } | ||||
		Reference in New Issue
	
	Block a user