mirror of
https://github.com/halejohn/Cloudreve.git
synced 2026-01-28 10:51:57 +08:00
Fix: untracked files
This commit is contained in:
@@ -160,3 +160,9 @@ func (handler Handler) Source(
|
||||
finalURL := baseURL.ResolveReference(signedURI).String()
|
||||
return finalURL, nil
|
||||
}
|
||||
|
||||
// Token 获取上传策略和认证Token,本地策略直接返回空值
|
||||
// TODO 测试
|
||||
func (handler Handler) Token(ctx context.Context, ttl int64, key string) (serializer.UploadCredential, error) {
|
||||
return serializer.UploadCredential{}, nil
|
||||
}
|
||||
|
||||
@@ -184,3 +184,11 @@ func TestHandler_GetDownloadURL(t *testing.T) {
|
||||
asserts.Empty(downloadURL)
|
||||
}
|
||||
}
|
||||
|
||||
func TestHandler_Token(t *testing.T) {
|
||||
asserts := assert.New(t)
|
||||
handler := Handler{}
|
||||
ctx := context.Background()
|
||||
_, err := handler.Token(ctx, 10, "123")
|
||||
asserts.NoError(err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user