mirror of
https://github.com/wavetermdev/backup.git
synced 2026-08-05 13:57:07 -07:00
moving hard to OID model
This commit is contained in:
@@ -40,7 +40,7 @@ func (bs *BlockService) CloseBlock(blockId string) {
|
||||
func (bs *BlockService) GetBlockData(blockId string) (*wstore.Block, error) {
|
||||
ctx, cancelFn := context.WithTimeout(context.Background(), 2*time.Second)
|
||||
defer cancelFn()
|
||||
blockData, err := wstore.DBGet[wstore.Block](ctx, blockId)
|
||||
blockData, err := wstore.DBGet[*wstore.Block](ctx, blockId)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("error getting block data: %w", err)
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@ const DefaultTimeout = 2 * time.Second
|
||||
func (cs *ClientService) GetClientData() (*wstore.Client, error) {
|
||||
ctx, cancelFn := context.WithTimeout(context.Background(), DefaultTimeout)
|
||||
defer cancelFn()
|
||||
clientData, err := wstore.DBGetSingleton[wstore.Client](ctx)
|
||||
clientData, err := wstore.DBGetSingleton[*wstore.Client](ctx)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("error getting client data: %w", err)
|
||||
}
|
||||
@@ -28,7 +28,7 @@ func (cs *ClientService) GetClientData() (*wstore.Client, error) {
|
||||
func (cs *ClientService) GetWorkspace(workspaceId string) (*wstore.Workspace, error) {
|
||||
ctx, cancelFn := context.WithTimeout(context.Background(), DefaultTimeout)
|
||||
defer cancelFn()
|
||||
ws, err := wstore.DBGet[wstore.Workspace](ctx, workspaceId)
|
||||
ws, err := wstore.DBGet[*wstore.Workspace](ctx, workspaceId)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("error getting workspace: %w", err)
|
||||
}
|
||||
@@ -38,7 +38,7 @@ func (cs *ClientService) GetWorkspace(workspaceId string) (*wstore.Workspace, er
|
||||
func (cs *ClientService) GetTab(tabId string) (*wstore.Tab, error) {
|
||||
ctx, cancelFn := context.WithTimeout(context.Background(), DefaultTimeout)
|
||||
defer cancelFn()
|
||||
tab, err := wstore.DBGet[wstore.Tab](ctx, tabId)
|
||||
tab, err := wstore.DBGet[*wstore.Tab](ctx, tabId)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("error getting tab: %w", err)
|
||||
}
|
||||
@@ -48,7 +48,7 @@ func (cs *ClientService) GetTab(tabId string) (*wstore.Tab, error) {
|
||||
func (cs *ClientService) GetWindow(windowId string) (*wstore.Window, error) {
|
||||
ctx, cancelFn := context.WithTimeout(context.Background(), DefaultTimeout)
|
||||
defer cancelFn()
|
||||
window, err := wstore.DBGet[wstore.Window](ctx, windowId)
|
||||
window, err := wstore.DBGet[*wstore.Window](ctx, windowId)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("error getting window: %w", err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user