This commit is contained in:
2026-10-17 16:00:21 +07:00
parent ee0478ab16
commit 300ff484df
21 changed files with 1643 additions and 870 deletions
+14
View File
@@ -51,6 +51,20 @@ func (s *server) GetGameExport(ctx context.Context, req *proto.GetGameExportReq)
return &proto.GameExportRsp{Export: mapGameExport(result)}, nil
}
func (s *server) ResetGameLocalMode(ctx context.Context, req *proto.ResetGameLocalModeReq) (*proto.ResetGameLocalModeRsp, error) {
claims, err := claimsFromContext(ctx)
if err != nil {
return nil, err
}
if !canExportGame(claims) {
return nil, status.Error(codes.PermissionDenied, "permission denied")
}
if err := s.gameExportService.ResetLocalMode(ctx, int(req.GetID()), req.GetExportID()); err != nil {
return nil, gameExportErrorStatus(err)
}
return &proto.ResetGameLocalModeRsp{}, nil
}
// GameExportDownloadHandler authenticates with the existing JWT processor and streams private ZIPs.
func GameExportDownloadHandler(jwt processor_jwt.IProcessorJWT, exports *game_export_service.GameExportService) http.Handler {
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {