Fix wrong data structure in JS for publishing sweets