Go to file
jordi fita mas 0d2812acc5 Use HTTP Host to establish the request’s company
We made the decision that this application will also serve the public
pages to guests and customers, to avoid the overhead of having to
synchronize all data between this application and a bespoke WordPress
plugin.

That means that i no longer can have a /company/slug in the URL to know
which company the request is for, not only because it looks ugly but
because guest users do not have a “main company”—or any company
whatsoever.

Since the public-facing web is going to be served through a valid DNS
domain, and all companies are going to have a different domain, i
realized this is enough: i only had to add a relation of company and
their hosts.  The same company can have many hosts for staging servers
or to separate the administration and public parts, for instance.

With change, the company is already known from the first handler, and
can pass it down to all the others, not only the handlers under
/company/slug/whatever.  And i no longer need the companyURL function,
as there is no more explicit company in the URL.

Even though template technically does not need the template, as it only
contains the ID —the rest of the data is in a relation inaccessible to
guests for now—, but i left the parameter just in case later on i need
the decimal digits or currency symbol for whatever reason.
2023-08-03 20:21:21 +02:00
cmd/camper Allow users to update their profile images 2023-07-28 20:15:09 +02:00
debian Add correct dependencies for camper-sqitch 2023-07-31 16:20:13 +02:00
deploy Use HTTP Host to establish the request’s company 2023-08-03 20:21:21 +02:00
pkg Use HTTP Host to establish the request’s company 2023-08-03 20:21:21 +02:00
po Allow users to update their profile images 2023-07-28 20:15:09 +02:00
revert Use HTTP Host to establish the request’s company 2023-08-03 20:21:21 +02:00
test Use HTTP Host to establish the request’s company 2023-08-03 20:21:21 +02:00
verify Use HTTP Host to establish the request’s company 2023-08-03 20:21:21 +02:00
web Use HTTP Host to establish the request’s company 2023-08-03 20:21:21 +02:00
.gitignore Add the skeleton of the web application 2023-07-23 00:11:00 +02:00
Makefile Add Debian package 2023-07-27 20:00:08 +02:00
demo.sql Use HTTP Host to establish the request’s company 2023-08-03 20:21:21 +02:00
go.mod Add the skeleton of the web application 2023-07-23 00:11:00 +02:00
go.sum Add the skeleton of the web application 2023-07-23 00:11:00 +02:00
sqitch.conf Add empty Sqitch configuration anq plan files 2023-07-20 23:43:23 +02:00
sqitch.plan Use HTTP Host to establish the request’s company 2023-08-03 20:21:21 +02:00