@riligar/elysia-sqlite 1.2.1 → 1.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/index.js +1 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riligar/elysia-sqlite",
3
- "version": "1.2.1",
3
+ "version": "1.2.2",
4
4
  "description": "Plugin ElysiaJS para gerenciamento de bancos de dados SQLite",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
package/src/index.js CHANGED
@@ -75,8 +75,7 @@ export const sqliteAdmin = ({ dbPath, prefix = "/admin", configPath = "./sqlite-
75
75
  .onBeforeHandle(({ path, set, session, body }) => {
76
76
  // Enforce trailing slash for root to ensure relative assets work
77
77
  if (path === prefix) {
78
- set.redirect = prefix + '/';
79
- return;
78
+ return Response.redirect(prefix + '/', 301);
80
79
  }
81
80
 
82
81
  // Permitir assets e HTML principal