mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-09-25 21:20:12 +00:00
fix secret loading
This commit is contained in:
parent
d494b6a959
commit
cacb16c0f1
2 changed files with 4 additions and 2 deletions
|
@ -168,10 +168,10 @@ func apiRoutes(e *gin.RouterGroup) {
|
||||||
queue.GET("/norunningpipelines", api.BlockTilQueueHasRunningItem)
|
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 := apiBase.Group("/secrets")
|
||||||
{
|
{
|
||||||
secrets.Use(session.MustAdmin())
|
secrets.Use(session.MustAdmin())
|
||||||
secrets.GET("", api.GetGlobalSecretList)
|
|
||||||
secrets.POST("", api.PostGlobalSecret)
|
secrets.POST("", api.PostGlobalSecret)
|
||||||
secrets.GET("/:secret", api.GetGlobalSecret)
|
secrets.GET("/:secret", api.GetGlobalSecret)
|
||||||
secrets.PATCH("/:secret", api.PatchGlobalSecret)
|
secrets.PATCH("/:secret", api.PatchGlobalSecret)
|
||||||
|
|
|
@ -70,10 +70,12 @@ export function usePagination<T, S = unknown>(
|
||||||
async function resetPage() {
|
async function resetPage() {
|
||||||
const _page = page.value;
|
const _page = page.value;
|
||||||
|
|
||||||
|
page.value = 1;
|
||||||
|
pageSize.value = 0;
|
||||||
hasMore.value = true;
|
hasMore.value = true;
|
||||||
data.value = [];
|
data.value = [];
|
||||||
|
loading.value = false;
|
||||||
each.value = (_each ?? []) as UnwrapRef<S[]>;
|
each.value = (_each ?? []) as UnwrapRef<S[]>;
|
||||||
page.value = 1;
|
|
||||||
|
|
||||||
if (_page === 1) {
|
if (_page === 1) {
|
||||||
// we need to reload manually as the page is already 1, so changing won't trigger watcher
|
// we need to reload manually as the page is already 1, so changing won't trigger watcher
|
||||||
|
|
Loading…
Reference in a new issue