Page MenuHomeSealhub

Przenieść fieldy z body do korzenia
Closed, ResolvedPublic

Description

Odwoływanie się do fieldów w body jest znacznie częstsze niż np. do timestampów, zatem zamiast poniższego:

const before = {
	created_context: {
		timestamp: 1535002242349,
		ip: "127.0.0.1",
		user_id: null,
		anonymous_user_id: "SJm9KUaoI7",
		total: 1,
	},
	last_modified_context: {
		timestamp: 1535002242349,
		ip: "127.0.0.1",
		user_id: null,
		anonymous_user_id: "SJm9KUaoI7",
		total: 1,
	},
	id: "Syr5YIpoL7",
	collection_name: "seals",
	body: { name: "Maksiu", desc: { gender: "male", weight: 280 } },
	calculated_fields: {},
};

chcemy trzymać dane w postaci:

const after = {
	_metadata: {
		collection_name: "seals",
		created_context: {
			timestamp: 1535002242349,
			ip: "127.0.0.1",
			user_id: null,
			anonymous_user_id: "SJm9KUaoI7",
			total: 1,
		},
		last_modified_context: {
			timestamp: 1535002242349,
			ip: "127.0.0.1",
			user_id: null,
			anonymous_user_id: "SJm9KUaoI7",
			total: 1,
		},
	},
	id: "Syr5YIpoL7",
	name: "Maksiu",
	desc: { gender: "male", weight: 280 },
	calculated_fields: {},
};

Revisions and Commits

Restricted Differential Revision
rS Sealious
D350
rST sealious-template
Restricted Differential Revision

Event Timeline

piotr-ptaszynski triaged this task as Very High priority.Aug 23 2018, 07:37
piotr-ptaszynski created this task.
piotr-ptaszynski created this object in space S5 Publiczna.
piotr-ptaszynski created this object with visibility "Public (No Login Required)".
piotr-ptaszynski updated the task description. (Show Details)
piotr-ptaszynski added a revision: Restricted Differential Revision.Aug 26 2018, 12:27
piotr-ptaszynski added a revision: Restricted Differential Revision.Sep 12 2018, 07:52
piotr-ptaszynski added a commit: Restricted Diffusion Commit.Sep 19 2018, 06:33
piotr-ptaszynski changed the task status from New to Review.Sep 27 2018, 06:19
piotr-ptaszynski closed this task as Resolved.Dec 10 2018, 10:04