mirror of
https://github.com/strapi/strapi.git
synced 2025-11-11 07:39:16 +00:00
don't populate update query
This commit is contained in:
parent
cbef873047
commit
2dadda640b
@ -678,7 +678,6 @@ describe('API Token', () => {
|
|||||||
select: expect.arrayContaining([expect.any(String)]),
|
select: expect.arrayContaining([expect.any(String)]),
|
||||||
where: { id },
|
where: { id },
|
||||||
data: attributes,
|
data: attributes,
|
||||||
populate: ['permissions'],
|
|
||||||
});
|
});
|
||||||
expect(res).toEqual(attributes);
|
expect(res).toEqual(attributes);
|
||||||
});
|
});
|
||||||
@ -799,7 +798,6 @@ describe('API Token', () => {
|
|||||||
select: expect.arrayContaining([expect.any(String)]),
|
select: expect.arrayContaining([expect.any(String)]),
|
||||||
where: { id },
|
where: { id },
|
||||||
data: omit(['permissions'], updatedAttributes),
|
data: omit(['permissions'], updatedAttributes),
|
||||||
populate: expect.anything(), // it doesn't matter how this is used
|
|
||||||
});
|
});
|
||||||
|
|
||||||
expect(res).toEqual(updatedAttributes);
|
expect(res).toEqual(updatedAttributes);
|
||||||
@ -871,7 +869,6 @@ describe('API Token', () => {
|
|||||||
select: expect.arrayContaining([expect.any(String)]),
|
select: expect.arrayContaining([expect.any(String)]),
|
||||||
where: { id },
|
where: { id },
|
||||||
data: omit(['permissions'], updatedAttributes),
|
data: omit(['permissions'], updatedAttributes),
|
||||||
populate: expect.anything(), // it doesn't matter how this is used
|
|
||||||
});
|
});
|
||||||
|
|
||||||
expect(res).toEqual({
|
expect(res).toEqual({
|
||||||
|
|||||||
@ -381,7 +381,6 @@ const update = async (id, attributes) => {
|
|||||||
|
|
||||||
const updatedToken = await strapi.query('admin::api-token').update({
|
const updatedToken = await strapi.query('admin::api-token').update({
|
||||||
select: SELECT_FIELDS,
|
select: SELECT_FIELDS,
|
||||||
populate: POPULATE_FIELDS,
|
|
||||||
where: { id },
|
where: { id },
|
||||||
data: omit('permissions', attributes),
|
data: omit('permissions', attributes),
|
||||||
});
|
});
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user