@anteros/core 0.0.2-alpha.1 → 0.0.2-alpha.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.
- package/package.json +1 -1
- package/server/api.ts +22 -26
package/package.json
CHANGED
package/server/api.ts
CHANGED
|
@@ -250,12 +250,10 @@ function initializeApi(app: Hono<{ Variables: HonoVariables }>) {
|
|
|
250
250
|
payload: body?.payload,
|
|
251
251
|
error: fn.error,
|
|
252
252
|
jwt: func.jwt,
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
},
|
|
258
|
-
}
|
|
253
|
+
cookies: {
|
|
254
|
+
delete: (name: string) => {
|
|
255
|
+
cookie.deleteCookie(c, name)
|
|
256
|
+
},
|
|
259
257
|
}
|
|
260
258
|
})
|
|
261
259
|
|
|
@@ -296,26 +294,24 @@ function initializeApi(app: Hono<{ Variables: HonoVariables }>) {
|
|
|
296
294
|
payload: body?.payload,
|
|
297
295
|
error: fn.error,
|
|
298
296
|
jwt: func.jwt,
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
}
|
|
297
|
+
cookies: {
|
|
298
|
+
set: (name: string, value: string, options?: {
|
|
299
|
+
httpOnly?: boolean;
|
|
300
|
+
secure?: boolean;
|
|
301
|
+
maxAge?: number;
|
|
302
|
+
path?: string;
|
|
303
|
+
domain?: string;
|
|
304
|
+
sameSite?: 'lax' | 'strict' | 'none';
|
|
305
|
+
}) => {
|
|
306
|
+
cookie.setCookie(c, name, value, options)
|
|
307
|
+
},
|
|
308
|
+
get: (name: string) => {
|
|
309
|
+
return cookie.getCookie(c, name)
|
|
310
|
+
},
|
|
311
|
+
delete: (name: string) => {
|
|
312
|
+
cookie.deleteCookie(c, name)
|
|
313
|
+
},
|
|
314
|
+
|
|
319
315
|
}
|
|
320
316
|
|
|
321
317
|
})
|