Skip to content

Commit da87012

Browse files
committed
Entities: Been through API responses & adjusted field visibility
1 parent d0a4c9a commit da87012

File tree

7 files changed

+7
-7
lines changed

7 files changed

+7
-7
lines changed

app/Entities/Models/Book.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class Book extends Entity implements HasDescriptionInterface, HasCoverInterface,
3333

3434
public float $searchFactor = 1.2;
3535

36-
protected $hidden = ['pivot', 'deleted_at', 'entity_id', 'entity_type', 'chapter_id', 'book_id'];
36+
protected $hidden = ['pivot', 'deleted_at', 'description_html', 'entity_id', 'entity_type', 'chapter_id', 'book_id', 'priority'];
3737
protected $fillable = ['name'];
3838

3939
/**

app/Entities/Models/Bookshelf.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class Bookshelf extends Entity implements HasDescriptionInterface, HasCoverInter
1919

2020
public float $searchFactor = 1.2;
2121

22-
protected $hidden = ['image_id', 'deleted_at', 'description_html', 'entity_id', 'entity_type', 'chapter_id', 'book_id'];
22+
protected $hidden = ['image_id', 'deleted_at', 'description_html', 'priority', 'default_template_id', 'sort_rule_id', 'entity_id', 'entity_type', 'chapter_id', 'book_id'];
2323
protected $fillable = ['name'];
2424

2525
/**

app/Entities/Models/Chapter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class Chapter extends BookChild implements HasDescriptionInterface, HasDefaultTe
1919
use ContainerTrait;
2020

2121
public float $searchFactor = 1.2;
22-
protected $hidden = ['pivot', 'deleted_at', 'description_html', 'entity_id', 'entity_type', 'chapter_id'];
22+
protected $hidden = ['pivot', 'deleted_at', 'description_html', 'sort_rule_id', 'image_id', 'entity_id', 'entity_type', 'chapter_id'];
2323
protected $fillable = ['name', 'priority'];
2424

2525
/**

dev/api/responses/books-read.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
"name": "Cool Animals",
5353
"slug": "cool-animals",
5454
"book_id": 16,
55-
"chapter_id": 0,
55+
"chapter_id": null,
5656
"draft": false,
5757
"template": false,
5858
"created_at": "2021-12-19T18:22:11.000000Z",

dev/api/responses/pages-create.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"id": 358,
33
"book_id": 1,
4-
"chapter_id": 0,
4+
"chapter_id": null,
55
"name": "My API Page",
66
"slug": "my-api-page",
77
"html": "<p id=\"bkmrk-my-new-api-page\">my new API page</p>",

dev/api/responses/pages-read.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"id": 306,
33
"book_id": 1,
4-
"chapter_id": 0,
4+
"chapter_id": null,
55
"name": "A page written in markdown",
66
"slug": "a-page-written-in-markdown",
77
"html": "<h1 id=\"bkmrk-this-is-my-cool-page\">This is my cool page! With some included text</h1>",

dev/api/responses/recycle-bin-list.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"deletable": {
1111
"id": 2582,
1212
"book_id": 25,
13-
"chapter_id": 0,
13+
"chapter_id": null,
1414
"name": "A Wonderful Page",
1515
"slug": "a-wonderful-page",
1616
"priority": 9,

0 commit comments

Comments
 (0)