feat: Enhance apple categorization logic and improve bulk category update feedback
Test Suite / test (24.15.0) (push) Has been cancelled
Test Suite / test (24.15.0) (push) Has been cancelled
This commit is contained in:
@@ -173,9 +173,6 @@ class AdminRepository {
|
||||
// ── Produkter ──────────────────────────────────────────────────────────────
|
||||
|
||||
Future<List<AdminProduct>> listProducts() =>
|
||||
_getList(ProductApiPaths.mine, AdminProduct.fromJson);
|
||||
|
||||
Future<List<AdminProduct>> listGlobalProducts() =>
|
||||
_getList(ProductApiPaths.list, AdminProduct.fromJson, requiresAuth: false);
|
||||
|
||||
Future<List<PendingProduct>> listPrivateProducts() =>
|
||||
@@ -244,8 +241,15 @@ class AdminRepository {
|
||||
parse: (d) => d as Map<String, dynamic>,
|
||||
);
|
||||
|
||||
Future<void> bulkSetCategory(List<int> ids, {required int? categoryId}) =>
|
||||
_postVoid(ProductApiPaths.bulkUpdate, {'ids': ids, 'categoryId': categoryId});
|
||||
Future<int> bulkSetCategory(List<int> ids, {required int? categoryId}) =>
|
||||
_post<int>(
|
||||
ProductApiPaths.bulkUpdate,
|
||||
body: {'ids': ids, 'categoryId': categoryId},
|
||||
parse: (d) {
|
||||
final map = Map<String, dynamic>.from(d as Map);
|
||||
return (map['updated'] as num?)?.toInt() ?? 0;
|
||||
},
|
||||
);
|
||||
|
||||
Future<void> mergeProducts({
|
||||
required int sourceProductId,
|
||||
|
||||
Reference in New Issue
Block a user