Fix puter sites errors

This commit is contained in:
KernelDeimos 2024-04-03 22:05:33 -04:00
parent a04cac60e6
commit b7a1f21e31
2 changed files with 4 additions and 4 deletions

View File

@ -33,7 +33,7 @@ class PuterSiteService extends BaseService {
root_dir_id: this.config.devtest_directory,
};
}
const rows = await this.read(
const rows = await this.db.read(
`SELECT * FROM subdomains WHERE subdomain = ? LIMIT 1`,
[subdomain]
);

View File

@ -25,14 +25,14 @@ class ServeGUIService extends BaseService {
async ['__on_install.routes-gui'] () {
const { app } = this.services.get('web-server');
// is this a puter.site domain?
require('../routers/hosting/puter-site')(app);
// Router for all other cases
app.use(require('../routers/_default'))
// Static files
app.use(express.static(_path.join(__dirname, '../../public')))
// is this a puter.site domain?
require('../routers/hosting/puter-site')(app);
}
}