mirror of
https://github.com/wgh136/nysoure.git
synced 2025-12-16 15:51:14 +00:00
API for rebuilding search index
This commit is contained in:
@@ -615,7 +615,15 @@ func GetPinnedResources() ([]model.ResourceView, error) {
|
||||
return views, nil
|
||||
}
|
||||
|
||||
func GetCharactersFromVndb(vnID string) ([]CharacterParams, error) {
|
||||
func GetCharactersFromVndb(vnID string, uid uint) ([]CharacterParams, error) {
|
||||
canUpload, err := checkUserCanUpload(uid)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if !canUpload {
|
||||
return nil, model.NewUnAuthorizedError("You have not permission to fetch characters from VNDB")
|
||||
}
|
||||
|
||||
client := http.Client{}
|
||||
jsonStr := fmt.Sprintf(`
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user