|
@@ -114,12 +114,13 @@ namespace TEAMModelOS.Controllers.Learn
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- Vote info = await client.GetContainer("TEAMModelOS", "Common").ReadItemAsync<Vote>(request.vote.id, new PartitionKey($"{request.vote.code}"));
|
|
|
+ Vote info = await client.GetContainer("TEAMModelOS", "Common").ReadItemAsync<Vote>(request.vote.id, new PartitionKey($"Vote-{request.vote.code}"));
|
|
|
if (info.progress.Equals("going"))
|
|
|
{
|
|
|
return Ok(new { v = "活动正在进行中" });
|
|
|
}
|
|
|
- vote = await client.GetContainer("TEAMModelOS", "Common").ReplaceItemAsync(info, info.id, new PartitionKey($"{info.code}"));
|
|
|
+ request.vote.code = info.code;
|
|
|
+ vote = await client.GetContainer("TEAMModelOS", "Common").ReplaceItemAsync(request.vote, info.id, new PartitionKey($"{info.code}"));
|
|
|
/*if (request.vote.scope.Equals("school"))
|
|
|
{
|
|
|
vote = await client.GetContainer("TEAMModelOS", "School").ReplaceItemAsync(request.vote, request.vote.id, new PartitionKey($"{request.vote.code}"));
|