api.serlo.org icon indicating copy to clipboard operation
api.serlo.org copied to clipboard

entitySet: do not ignore `licenseId` set by editor

Open elbotho opened this issue 1 year ago • 1 comments

What is wrong?

Currently the API always uses the default license when creating new entities: https://github.com/serlo/api.serlo.org/blob/staging/packages/server/src/schema/uuid/abstract-entity/entity-set-handler.ts#L151

How should it behave?

It would be nice if the API would use the licenseId set in the editor (in the serlo-template-plugins).

Proposed Solution

We need to parse the entity content (outermost plugin) and retrieve and use the licenseId if there is one. Otherwise falling back to default like before is fine.

elbotho avatar Mar 28 '24 10:03 elbotho

(https://github.com/serlo/frontend/pull/3501)

elbotho avatar Apr 03 '24 11:04 elbotho