feat: add ax serve command with JSON API backed by NodeService
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -82,3 +82,14 @@ func GetNodeService(cfg Config) (NodeService, error) {
|
||||
}
|
||||
return &nodeServiceImpl{store: st, userID: user}, nil
|
||||
}
|
||||
|
||||
func GetNodeServiceForUser(user string) (NodeService, error) {
|
||||
if user == "" {
|
||||
return nil, fmt.Errorf("user is required")
|
||||
}
|
||||
st, err := store.FindAndOpenSQLiteStore()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return &nodeServiceImpl{store: st, userID: user}, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user