MCPcopy
hub / github.com/gpustack/gpustack / get_by_user_id

Method get_by_user_id

gpustack/server/services.py:438–444  ·  view source on GitHub ↗
(self, user_id: int)

Source from the content-addressed store, hash-verified

436 return result
437
438 async def get_by_user_id(self, user_id: int) -> List[ApiKey]:
439 results = await ApiKey.all_by_field(self.session, "user_id", user_id)
440 if results is None:
441 return []
442 for result in results:
443 self.session.expunge(result)
444 return results
445
446 async def update(self, api_key: ApiKey, source: Union[dict, SQLModel, None] = None):
447 result = await api_key.update(self.session, source)

Callers 1

deleteMethod · 0.80

Calls 1

all_by_fieldMethod · 0.80

Tested by

no test coverage detected