🧹 Moved Sb1 API to separate workspace and created common workspace
- Created common workspace - Create Sparebank1Api workspace - Moved logger to common - Moved SB1 types to types.ts - Logger will avoid duplicating first line when capturing console.logs - Updated imports and added type keyword - Added nonUniqueId type
This commit is contained in:
12
packages/sparebank1Api/common.ts
Normal file
12
packages/sparebank1Api/common.ts
Normal file
@ -0,0 +1,12 @@
|
||||
import type { Failure, Success } from "./types"
|
||||
|
||||
export const baseUrl = "https://api.sparebank1.no"
|
||||
|
||||
export const success = <T>(data: T): Success<T> => ({
|
||||
status: "success",
|
||||
data: data,
|
||||
})
|
||||
export const failure = <T>(data: T): Failure<T> => ({
|
||||
status: "failure",
|
||||
data: data,
|
||||
})
|
Reference in New Issue
Block a user