Update user_created field to use username instead
of first_name
This commit is contained in:
parent
c91d89380a
commit
c7ceb43979
3 changed files with 4 additions and 5 deletions
|
|
@ -4,8 +4,6 @@ from uuid import UUID
|
||||||
|
|
||||||
import httpx
|
import httpx
|
||||||
from httpx import HTTPError, HTTPStatusError
|
from httpx import HTTPError, HTTPStatusError
|
||||||
from loguru import logger
|
|
||||||
|
|
||||||
from langflow.services.base import Service
|
from langflow.services.base import Service
|
||||||
from langflow.services.store.schema import (
|
from langflow.services.store.schema import (
|
||||||
CreateComponentResponse,
|
CreateComponentResponse,
|
||||||
|
|
@ -14,6 +12,7 @@ from langflow.services.store.schema import (
|
||||||
StoreComponentCreate,
|
StoreComponentCreate,
|
||||||
)
|
)
|
||||||
from langflow.services.store.utils import process_tags_for_post
|
from langflow.services.store.utils import process_tags_for_post
|
||||||
|
from loguru import logger
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
from langflow.services.settings.service import SettingsService
|
from langflow.services.settings.service import SettingsService
|
||||||
|
|
@ -60,7 +59,7 @@ class StoreService(Service):
|
||||||
"id",
|
"id",
|
||||||
"name",
|
"name",
|
||||||
"description",
|
"description",
|
||||||
"user_created.first_name",
|
"user_created.username",
|
||||||
"is_component",
|
"is_component",
|
||||||
"tags.tags_id.name",
|
"tags.tags_id.name",
|
||||||
"tags.tags_id.id",
|
"tags.tags_id.id",
|
||||||
|
|
|
||||||
|
|
@ -172,7 +172,7 @@ export const MarketCardComponent = ({
|
||||||
</CardTitle>
|
</CardTitle>
|
||||||
</div>
|
</div>
|
||||||
<span className="text-xs text-primary">
|
<span className="text-xs text-primary">
|
||||||
by <b>{data.user_created.first_name}</b>
|
by <b>{data.user_created.username}</b>
|
||||||
</span>
|
</span>
|
||||||
<CardDescription className="pb-2 pt-2">
|
<CardDescription className="pb-2 pt-2">
|
||||||
<div className="truncate-doubleline">{data.description}</div>
|
<div className="truncate-doubleline">{data.description}</div>
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ export type storeComponent = {
|
||||||
description: string;
|
description: string;
|
||||||
liked_by_count: number;
|
liked_by_count: number;
|
||||||
liked_by_user?: boolean;
|
liked_by_user?: boolean;
|
||||||
user_created: { first_name: string };
|
user_created: { username: string };
|
||||||
};
|
};
|
||||||
|
|
||||||
export type StoreComponentResponse = {
|
export type StoreComponentResponse = {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue