finished integrating this "board packs" thing I was talking about yesterday.. just prior to 6 AM (the goal).
it's just the joining together of several data structures, returning it all in one call. But just for shits & giggles, here's an example. This is a "board pack" which gives me data for a: Board, BoardStat, Thread, ThreadPost, and the User who posted it:
{
boards_packs: [
{
latest_thread_post: {
thread_id: 1,
modified_by: null,
body: {
data: "latest?",
schema: "post_data_request",
type: "post_data_bbcode",
v: 1
},
modified_at: "2016-04-04T07:52:34.059885000000Z",
schema: "thread_post_response",
created_by: 1,
created_at: "2016-04-04T07:52:34.059885000000Z",
id: 19878,
title: null,
user_id: 1,
v: 1,
parent_id: null
},
latest_thread_post_user: {
email_md5: "b2eff1bf71b3445e307ec91e4018d24c",
nick: "andrewdarqui",
schema: "user_sanitized_response",
display_nick: "andrewdarqui",
created_at: "2016-04-04T07:30:33.174801000000Z",
id: 1,
v: 1,
is_active: false
},
schema: "board_pack_response",
board_stat: {
views: 0,
schema: "board_stat_response",
thread_posts: 11,
threads: 5,
board_id: 1,
v: 1
},
board: {
modified_by: null,
modified_at: null,
schema: "board_response",
forum_id: 1,
created_by: 1,
name: "board",
created_at: "2016-01-19T02:43:08.357499000000Z",
id: 1,
v: 1,
parent_id: null,
desc: "board desc"
},
latest_thread: {
sticky: false,
locked: false,
modified_by: null,
modified_at: "2016-04-02T21:36:22.870992000000Z",
schema: "thread_response",
created_by: 1,
poll: null,
name: "Test Thread",
activity_at: "2016-04-04T07:52:34.059885000000Z",
created_at: "2016-01-19T20:19:58.389153000000Z",
id: 1,
board_id: 1,
v: 1,
desc: "A thread for testing"
},
v: 1
}
],
schema: "boards_packs_responses",
v: 1
}
nothing amazing but.. stuff like that is going to make the forum code i'm doing really model what we already have. I now have it showing latest post in the board view and simple stuff like that.
I refactored so much code today, it's pretty ridiculous.
pC!