Skip to content

Commit 95629ee

Browse files
chore: wip
1 parent 44047c2 commit 95629ee

File tree

6 files changed

+23
-26
lines changed

6 files changed

+23
-26
lines changed

app/Middleware/Api.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1+
import { HttpError } from '@stacksjs/error-handling'
12
import { Middleware, request } from '@stacksjs/router'
2-
import { HttpError } from 'index'
33
import { AccessToken, Team } from '../../storage/framework/orm/src'
44

55
export default new Middleware({

app/Middleware/BearerToken.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1+
import { HttpError } from '@stacksjs/error-handling'
12
import { Middleware, request } from '@stacksjs/router'
2-
import { HttpError } from 'index'
3-
import { AccessToken, Team } from '../../storage/framework/orm/src'
43

54
export default new Middleware({
65
name: 'Bearer Token Test',
@@ -9,7 +8,7 @@ export default new Middleware({
98
const bearerToken = request.bearerToken() || ''
109
const validToken = 'Test@1234'
1110

12-
if (!bearerToken || bearerToken !== validToken)
11+
if (!bearerToken || bearerToken !== validToken)
1312
throw new HttpError(401, 'Unauthorized.')
1413
},
1514
})

storage/framework/core/desktop/src/index.ts

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -18,22 +18,22 @@ import * as updater from '@tauri-apps/api/updater'
1818
import * as window from '@tauri-apps/api/window'
1919

2020
export const desktop = {
21-
// app,
22-
// event,
23-
// clipboard,
24-
// dialog,
25-
// fs,
26-
// globalShortcut,
27-
// http,
28-
// mocks,
29-
// notification,
30-
// os,
31-
// path,
32-
// process,
33-
// shell,
34-
// tauri,
35-
// updater,
36-
// window,
21+
app,
22+
event,
23+
clipboard,
24+
dialog,
25+
fs,
26+
globalShortcut,
27+
http,
28+
mocks,
29+
notification,
30+
os,
31+
path,
32+
process,
33+
shell,
34+
tauri,
35+
updater,
36+
window,
3737
}
3838

3939
export async function openShell(link: string) {

storage/framework/core/payments/src/billable/invoice.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export const manageInvoice: ManageInvoice = (() => {
1414

1515
const invoices = await stripe.invoices.list({
1616
customer: user?.stripeId(),
17-
expand: ['data.payment_intent.payment_method']
17+
expand: ['data.payment_intent.payment_method'],
1818
})
1919

2020
return invoices

storage/framework/core/router/src/server.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -144,10 +144,9 @@ async function execute(foundRoute: Route, req: Request, { statusCode }: Options)
144144
&& typeof middlewarePayload === 'object'
145145
&& Object.keys(middlewarePayload).length > 0
146146
) {
147-
148147
const { status, message } = middlewarePayload
149-
150-
return new Response(JSON.stringify(`<html><body><h1>${message}</h1<pre></pre></body></html>`), {
148+
149+
return new Response(`<html><body><h1>${message}</h1<pre></pre></body></html>`, {
151150
headers: {
152151
'Content-Type': 'application/json',
153152
'Access-Control-Allow-Origin': '*',

storage/framework/core/search-engine/src/helpers.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
* This file is used to define the types/interfaces used in the project.
33
*/
44

5-
import { cache } from '@stacksjs/cache'
65
import type { SearchEngineStore } from './types'
76

87
// import { isString } from '@stacksjs/validation'
@@ -12,7 +11,7 @@ export function isString(val: unknown): val is string {
1211
}
1312

1413
export function determineState(): SearchEngineStore {
15-
const ls = cache.get('search-engine')
14+
const ls = localStorage.getItem('search-engine')
1615

1716
if (isString(ls))
1817
return JSON.parse(ls) as SearchEngineStore

0 commit comments

Comments
 (0)