mirror of
https://github.com/Unleash/unleash.git
synced 2025-01-25 00:07:47 +01:00
fix: use validated and stripped data when updating
This commit is contained in:
parent
192c292ecf
commit
ef5b67974d
@ -87,11 +87,13 @@ class ContextController extends Controller {
|
||||
try {
|
||||
await this.store.get(name);
|
||||
|
||||
await contextSchema.validateAsync(updatedContextField);
|
||||
const value = await contextSchema.validateAsync(
|
||||
updatedContextField,
|
||||
);
|
||||
await this.eventStore.store({
|
||||
type: CONTEXT_FIELD_UPDATED,
|
||||
createdBy: userName,
|
||||
data: updatedContextField,
|
||||
data: value,
|
||||
});
|
||||
res.status(200).end();
|
||||
} catch (error) {
|
||||
|
Loading…
Reference in New Issue
Block a user