Skip to content

attachable classes#137

Merged
aryarm merged 9 commits intomasterfrom
attachableClasses
Mar 21, 2019
Merged

attachable classes#137
aryarm merged 9 commits intomasterfrom
attachableClasses

Conversation

@aryarm
Copy link
Member

@aryarm aryarm commented Feb 23, 2019

See issue #133

Add status attribute to classes

Inform Max and Yuki about which classes can be attached to resources using the "status" attribute.
A value of 1 indicates that it can be attached to resources (and a value of 0 disallows this behavior)
Thus, classes.json will now return

{
    "name":"Class 1",
    "author_name":"Alena Kiehn",
    "status":1,
    "created":"Jan 1, 2019 11:53 PM",
    "updated":"Jan 1, 2019 11:54 PM"
}

and nodes returned by tree.class will also have a status attribute.

Make class_id required for resource creation

Make class_id a required attribute to be sent in resources.store. This is what it should look like from now on:

{
    "name":"Resource 2",
    "use_id":1,
    "class_id":1,
    "contents":[
        {
            "name":"Resource Content 2",
            "type":"link",
            "content":"http://www.hessel.com"
        }
    ]
}

where class_id can be 0 if you want to attach the resource to the root.

@aryarm aryarm added this to the PHP Team - MVP milestone Feb 23, 2019
@aryarm aryarm marked this pull request as ready for review February 24, 2019 03:21
@aryarm aryarm merged commit 89370b5 into master Mar 21, 2019
@aryarm aryarm deleted the attachableClasses branch March 21, 2019 04:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments