mirror of
https://github.com/HeyPuter/puter.git
synced 2025-02-02 23:28:39 +08:00
Fix puter sites errors
This commit is contained in:
parent
a04cac60e6
commit
b7a1f21e31
@ -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]
|
||||
);
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user