randomouscrap98 / contentapi

A generic content system to make some kinda standard websites
GNU General Public License v3.0
9 stars 2 forks source link

`userpageId` field on users (instead of content.contentType="userpage") #130

Closed 12Me21 closed 2 years ago

12Me21 commented 2 years ago

Currently, a user's userpage is their (first?) page with contentType="userpage", I think it might be easier to have a userpageId field on users instead

Advantages:

Disadvantages:

randomouscrap98 commented 2 years ago

Oh thank you for thinking about disadvantages, I hadn't thought about those

randomouscrap98 commented 2 years ago

So I'm putting oldsbs on this because it will impact how oldsbs operates, whatever decision we make.

As for the disadvantages:

I'm starting to wonder if the disadvantages are worth it. What's the problem with user pages as they are now... just that deciding which one to use isn't trivial? I still think the query is easier than all the problems that arise, what do you think? The query still amounts to just one request, something like "type is userpage, create user is userid, sort by id desc limit 1 (to give latest)"

randomouscrap98 commented 2 years ago

I think we have decided to go with a different solution: create an internal_type for userpages and migrate all (or most) of the userpages to that. This way, they are natively supported by the api, and still easily removable from the resultsets. Also, macros can be created to standardize how a userpage is retrieved.