fix secret loading

This commit is contained in:
Anbraten 2024-04-16 08:44:56 +02:00
parent d494b6a959
commit cacb16c0f1
2 changed files with 4 additions and 2 deletions

View file

@ -168,10 +168,10 @@ func apiRoutes(e *gin.RouterGroup) {
queue.GET("/norunningpipelines", api.BlockTilQueueHasRunningItem)
}
apiBase.GET("/secrets", session.MustUser(), api.GetGlobalSecretList) // global secrets can be read without actual values by any user
secrets := apiBase.Group("/secrets")
{
secrets.Use(session.MustAdmin())
secrets.GET("", api.GetGlobalSecretList)
secrets.POST("", api.PostGlobalSecret)
secrets.GET("/:secret", api.GetGlobalSecret)
secrets.PATCH("/:secret", api.PatchGlobalSecret)

View file

@ -70,10 +70,12 @@ export function usePagination<T, S = unknown>(
async function resetPage() {
const _page = page.value;
page.value = 1;
pageSize.value = 0;
hasMore.value = true;
data.value = [];
loading.value = false;
each.value = (_each ?? []) as UnwrapRef<S[]>;
page.value = 1;
if (_page === 1) {
// we need to reload manually as the page is already 1, so changing won't trigger watcher